diff options
author | Ross Burton <ross.burton@intel.com> | 2014-01-16 13:31:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-19 16:32:07 +0000 |
commit | 49eaa0fcff4a91c17fd41d61321f0c3e8b2c91dc (patch) | |
tree | 06da87043def3ff057cc0942a66af5c809187daa /meta/recipes-core/glib-2.0 | |
parent | 6dcc4e7ded0910916e145e548045734ae2675639 (diff) | |
download | poky-49eaa0fcff4a91c17fd41d61321f0c3e8b2c91dc.tar.gz |
glib-2.0: fix the dbus-appinfo test when running outside of X
This test was attempting to connect to a session bus and hanging if it couldn't.
Take a patch from upstream to correctly use a private bus.
[ YOCTO #5696 ]
(From OE-Core rev: 12e30b653899567312a7ec29b6e972c85ba8e25e)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch | 65 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb | 1 |
2 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch b/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch new file mode 100644 index 0000000000..0db8fd1609 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | Fix dbus-appinfo from attempting to use the session's bus, and hanging if there | ||
2 | isn't one present. | ||
3 | |||
4 | Upstream-Status: Backport | ||
5 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
6 | |||
7 | From 940fa98290812789d095d93ff1c550cd86fb2428 Mon Sep 17 00:00:00 2001 | ||
8 | From: Xavier Claessens <xavier.claessens@collabora.co.uk> | ||
9 | Date: Mon, 28 Oct 2013 21:18:54 +0000 | ||
10 | Subject: Tests: add session_bus_run() and use it where possible | ||
11 | |||
12 | This is to avoid having again the subtil bug in dbus-appinfo.c: | ||
13 | session_bus_down() was called before g_test_run() so the test was | ||
14 | running on the user's dbus session. | ||
15 | |||
16 | https://bugzilla.gnome.org/show_bug.cgi?id=697348 | ||
17 | --- | ||
18 | diff --git a/gio/tests/dbus-appinfo.c b/gio/tests/dbus-appinfo.c | ||
19 | index ca11e98..7698429 100644 | ||
20 | --- a/gio/tests/dbus-appinfo.c | ||
21 | +++ b/gio/tests/dbus-appinfo.c | ||
22 | @@ -280,11 +280,7 @@ main (int argc, char **argv) | ||
23 | { | ||
24 | g_test_init (&argc, &argv, NULL); | ||
25 | |||
26 | - session_bus_up (); | ||
27 | - | ||
28 | g_test_add_func ("/appinfo/dbusappinfo", test_dbus_appinfo); | ||
29 | |||
30 | - session_bus_down (); | ||
31 | - | ||
32 | - return g_test_run (); | ||
33 | + return session_bus_run (); | ||
34 | } | ||
35 | diff --git a/gio/tests/gdbus-sessionbus.c b/gio/tests/gdbus-sessionbus.c | ||
36 | index 68c4449..13c2edb 100644 | ||
37 | --- a/gio/tests/gdbus-sessionbus.c | ||
38 | +++ b/gio/tests/gdbus-sessionbus.c | ||
39 | @@ -47,3 +47,14 @@ session_bus_down (void) | ||
40 | g_clear_object (&singleton); | ||
41 | } | ||
42 | |||
43 | +gint | ||
44 | +session_bus_run (void) | ||
45 | +{ | ||
46 | + gint ret; | ||
47 | + | ||
48 | + session_bus_up (); | ||
49 | + ret = g_test_run (); | ||
50 | + session_bus_down (); | ||
51 | + | ||
52 | + return ret; | ||
53 | +} | ||
54 | diff --git a/gio/tests/gdbus-sessionbus.h b/gio/tests/gdbus-sessionbus.h | ||
55 | index 7ef3abd..284cd00 100644 | ||
56 | --- a/gio/tests/gdbus-sessionbus.h | ||
57 | +++ b/gio/tests/gdbus-sessionbus.h | ||
58 | @@ -30,6 +30,7 @@ G_BEGIN_DECLS | ||
59 | void session_bus_up (void); | ||
60 | void session_bus_stop (void); | ||
61 | void session_bus_down (void); | ||
62 | +gint session_bus_run (void); | ||
63 | |||
64 | G_END_DECLS | ||
65 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb index 02730f17ea..a5bfc707b3 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb | |||
@@ -11,6 +11,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | |||
11 | file://glib-2.0-configure-readlink.patch \ | 11 | file://glib-2.0-configure-readlink.patch \ |
12 | file://run-ptest \ | 12 | file://run-ptest \ |
13 | file://0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch \ | 13 | file://0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch \ |
14 | file://ptest-dbus.patch \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | SRC_URI_append_class-native = " file://glib-gettextize-dir.patch" | 17 | SRC_URI_append_class-native = " file://glib-gettextize-dir.patch" |