diff options
| -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" |
