From 1dbcfeebcff344ae3d3f5b8e9ede78cc908284de Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 21 May 2008 14:15:20 +0000 Subject: [PATCH] - If the session bus isn't running, assume local client side access to the database (bug 446703) --- GConf2.spec | 6 +++++- gconf-2.22.0-use-dbus.patch | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/GConf2.spec b/GConf2.spec index 053f75b..207169b 100644 --- a/GConf2.spec +++ b/GConf2.spec @@ -7,7 +7,7 @@ Summary: A process-transparent configuration system Name: GConf2 Version: 2.22.0 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPLv2+ Group: System Environment/Base Source: http://download.gnome.org/sources/GConf/2.22/GConf-%{version}.tar.bz2 @@ -160,6 +160,10 @@ fi %{_libdir}/pkgconfig/* %changelog +* Wed May 21 2008 Ray Strode - 2.22.0-8 +- If the session bus isn't running, assume local client side + access to the database (bug 446703) + * Wed May 14 2008 Ray Strode - 2.22.0-7 - update add_seconds patch to not remove timeouts that aren't created anymore diff --git a/gconf-2.22.0-use-dbus.patch b/gconf-2.22.0-use-dbus.patch index 6e5aaf4..6b731c6 100644 --- a/gconf-2.22.0-use-dbus.patch +++ b/gconf-2.22.0-use-dbus.patch @@ -764,3 +764,36 @@ diff -up /dev/null GConf-2.22.0/gconf/org.gnome.GConf.service.in dbus_error_init (&bus_error); connection = dbus_bus_get (DBUS_BUS_SESSION, &bus_error); +Index: gconf/gconf/gconftool.c +=================================================================== +--- gconf/gconf/gconftool.c (revision 2600) ++++ gconf/gconf/gconftool.c (working copy) +@@ -890,7 +890,27 @@ main (int argc, char** argv) + } + + if (config_source == NULL) +- conf = gconf_engine_get_default(); ++ { ++ /* If we aren't running from within a session, ++ * assume we'll be touching the database locally ++ */ ++ conf = NULL; ++ if (g_getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL) ++ { ++ char *conffile; ++ GSList *addresses; ++ ++ conffile = g_strconcat (GCONF_CONFDIR, "/path", NULL); ++ addresses = gconf_load_source_path (conffile, NULL); ++ g_free(conffile); ++ ++ conf = gconf_engine_get_local_for_addresses (addresses, &err); ++ gconf_address_list_free (addresses); ++ } ++ ++ if (conf == NULL) ++ conf = gconf_engine_get_default(); ++ } + else + { + GSList *addresses;