bluez4: use legacy pygobject instead of gobject-introspection

gobject introspection is not supported in Yocto, so there is not a
python binding package to use it.

Bluez4 uses such functionality in some of the test scripts. This patch
replaces it with the legacy pygobject, so they can work again.

https://jira.digi.com/browse/DEL-1274

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2014-09-18 18:29:37 +02:00
parent b67ad75565
commit f12cad7882
2 changed files with 98 additions and 0 deletions

View File

@ -0,0 +1,96 @@
From: Javier Viguera <javier.viguera@digi.com>
Date: Thu, 18 Sep 2014 17:22:23 +0200
Subject: [PATCH] Use legacy pygobject instead of gobject introspection
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
test/simple-agent | 4 ++--
test/test-device | 4 ++--
test/test-discovery | 4 ++--
test/test-manager | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/test/simple-agent b/test/simple-agent
index a25eaf07374b..a089cbc5a87d 100755
--- a/test/simple-agent
+++ b/test/simple-agent
@@ -2,7 +2,7 @@
from __future__ import absolute_import, print_function, unicode_literals
-from gi.repository import GObject
+import gobject
import sys
import dbus
@@ -122,7 +122,7 @@ if __name__ == '__main__':
path = "/test/agent"
agent = Agent(bus, path)
- mainloop = GObject.MainLoop()
+ mainloop = gobject.MainLoop()
if len(args) > 1:
if len(args) > 2:
diff --git a/test/test-device b/test/test-device
index 81a44f8ab703..32bcfbaed2dd 100755
--- a/test/test-device
+++ b/test/test-device
@@ -2,7 +2,7 @@
from __future__ import absolute_import, print_function, unicode_literals
-from gi.repository import GObject
+import gobject
import sys
import dbus
@@ -12,7 +12,7 @@ from optparse import OptionParser, make_option
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
-mainloop = GObject.MainLoop()
+mainloop = gobject.MainLoop()
manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.bluez.Manager")
diff --git a/test/test-discovery b/test/test-discovery
index 269c51c0d9b4..43ee072cb0c7 100755
--- a/test/test-discovery
+++ b/test/test-discovery
@@ -2,7 +2,7 @@
from __future__ import absolute_import, print_function, unicode_literals
-from gi.repository import GObject
+import gobject
import dbus
import dbus.mainloop.glib
@@ -59,5 +59,5 @@ if __name__ == '__main__':
adapter.StartDiscovery()
- mainloop = GObject.MainLoop()
+ mainloop = gobject.MainLoop()
mainloop.run()
diff --git a/test/test-manager b/test/test-manager
index 8a7e2f6aac1a..321adf892855 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -2,7 +2,7 @@
from __future__ import absolute_import, print_function, unicode_literals
-from gi.repository import GObject
+import gobject
import dbus
import dbus.mainloop.glib
@@ -36,5 +36,5 @@ if __name__ == "__main__":
except:
pass
- mainloop = GObject.MainLoop()
+ mainloop = gobject.MainLoop()
mainloop.run()

View File

@ -1,3 +1,5 @@
# Copyright (C) 2013 Digi International. # Copyright (C) 2013 Digi International.
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
EXTRA_OECONF_append = " --enable-health" EXTRA_OECONF_append = " --enable-health"