Bug#648724: [PATCH] Fix #648724
Sascha Silbe
sascha-pgp at silbe.org
Mon Nov 14 21:13:10 UTC 2011
* 05-D-Bus-backend-Add-GCONF_DEFAULT_SOURCE_PATH-support-.patch:
Patch to fix GCONF_DEFAULT_SOURCE_PATH support when building with D-Bus
backend. Closes: #648724
---
The included GConf patch has been submitted upstream [1].
debian/changelog | 9 ++
...nd-Add-GCONF_DEFAULT_SOURCE_PATH-support-.patch | 108 ++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 118 insertions(+), 0 deletions(-)
create mode 100644 debian/patches/05-D-Bus-backend-Add-GCONF_DEFAULT_SOURCE_PATH-support-.patch
[1] https://bugzilla.gnome.org/show_bug.cgi?id=664031#c2
diff --git a/debian/changelog b/debian/changelog
index ce0570f..2299e82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+gconf (3.2.3-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * 0001-D-Bus-backend-Add-GCONF_DEFAULT_SOURCE_PATH-support-.patch:
+ Patch to fix GCONF_DEFAULT_SOURCE_PATH support when building with D-Bus
+ backend. Closes: #648724
+
+ -- Sascha Silbe <sascha-pgp at silbe.org> Mon, 14 Nov 2011 20:24:27 +0000
+
gconf (3.2.3-1) unstable; urgency=low
[ Jeremy Bicha ]
diff --git a/debian/patches/05-D-Bus-backend-Add-GCONF_DEFAULT_SOURCE_PATH-support-.patch b/debian/patches/05-D-Bus-backend-Add-GCONF_DEFAULT_SOURCE_PATH-support-.patch
new file mode 100644
index 0000000..8ef3f23
--- /dev/null
+++ b/debian/patches/05-D-Bus-backend-Add-GCONF_DEFAULT_SOURCE_PATH-support-.patch
@@ -0,0 +1,108 @@
+From 04c83a792700cd974c43c83feb7a8dae05e68a63 Mon Sep 17 00:00:00 2001
+From: Sascha Silbe <sascha-pgp at silbe.org>
+Date: Mon, 14 Nov 2011 16:13:27 +0100
+Subject: [PATCH] D-Bus backend: Add GCONF_DEFAULT_SOURCE_PATH support
+ (#664031)
+
+Forward-port 7baf4c6b33a6dd0697a8bdb81bd86c72d58ebdc6
+("Allow overriding the default config via $GCONF_DEFAULT_SOURCE_PATH")
+from the ORBit to the D-Bus backend to fix (sugar-)jhbuild breakage when
+building with --disable-orbit.
+---
+ gconf/gconf-dbus.c | 30 +++++++++++++++++++-----------
+ 1 files changed, 19 insertions(+), 11 deletions(-)
+
+diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c
+index 817a1f9..9f92125 100644
+--- a/gconf/gconf-dbus.c
++++ b/gconf/gconf-dbus.c
+@@ -76,8 +76,6 @@ struct _GConfEngine {
+
+ gpointer owner;
+ int owner_use_count;
+-
+- guint is_default : 1;
+
+ /* If TRUE, this is a local engine (and therefore
+ * has no ctable and no notifications)
+@@ -299,7 +297,6 @@ gconf_engine_blank (gboolean remote)
+
+ conf->local_sources = NULL;
+ conf->is_local = FALSE;
+- conf->is_default = TRUE;
+ }
+ else
+ {
+@@ -308,7 +305,6 @@ gconf_engine_blank (gboolean remote)
+ conf->notify_dirs = NULL;
+ conf->local_sources = NULL;
+ conf->is_local = TRUE;
+- conf->is_default = FALSE;
+ }
+
+ return conf;
+@@ -512,8 +508,8 @@ ensure_database (GConfEngine *conf,
+
+ if (conf->database != NULL)
+ return TRUE;
+-
+- if (conf->is_default)
++
++ if (conf->addresses == NULL)
+ {
+ message = dbus_message_new_method_call (GCONF_DBUS_SERVICE,
+ GCONF_DBUS_SERVER_OBJECT,
+@@ -811,7 +807,9 @@ GConfEngine*
+ gconf_engine_get_default (void)
+ {
+ GConfEngine* conf = NULL;
+-
++ const gchar* source_path;
++ GError* err = NULL;
++
+ if (default_engine)
+ conf = default_engine;
+
+@@ -819,9 +817,21 @@ gconf_engine_get_default (void)
+ {
+ conf = gconf_engine_blank (TRUE);
+
+- conf->is_default = TRUE;
+-
+ default_engine = conf;
++
++ source_path = g_getenv ("GCONF_DEFAULT_SOURCE_PATH");
++ if (source_path != NULL)
++ {
++ conf->addresses = gconf_load_source_path (source_path, &err);
++ if (err)
++ {
++ g_warning ("Could not parse GCONF_DEFAULT_SOURCE_PATH: %s",
++ err->message);
++ g_error_free (err);
++ }
++ }
++ else
++ conf->addresses = NULL;
+ }
+ else
+ conf->refcount += 1;
+@@ -843,7 +853,6 @@ gconf_engine_get_for_address (const gchar* address, GError** err)
+ {
+ conf = gconf_engine_blank (TRUE);
+
+- conf->is_default = FALSE;
+ conf->addresses = addresses;
+
+ if (!ensure_database (conf, TRUE, err))
+@@ -877,7 +886,6 @@ gconf_engine_get_for_addresses (GSList *addresses, GError** err)
+
+ conf = gconf_engine_blank (TRUE);
+
+- conf->is_default = FALSE;
+ conf->addresses = NULL;
+
+ tmp = addresses;
+--
+1.7.6.3
+
diff --git a/debian/patches/series b/debian/patches/series
index ed48d84..c92dfd1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
01_defaults_path.patch
02_fix_wrong_return_value.patch
04_manpage.patch
+05-D-Bus-backend-Add-GCONF_DEFAULT_SOURCE_PATH-support-.patch
25_gconf-path-max-hurd.patch
--
1.7.6.3
More information about the pkg-gnome-maintainers
mailing list