- If the session bus isn't running, assume local client side access to the

database (bug 446703)
epel9
Ray Strode 17 years ago
parent dda7f28432
commit 1dbcfeebcf

@ -7,7 +7,7 @@
Summary: A process-transparent configuration system Summary: A process-transparent configuration system
Name: GConf2 Name: GConf2
Version: 2.22.0 Version: 2.22.0
Release: 7%{?dist} Release: 8%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Base Group: System Environment/Base
Source: http://download.gnome.org/sources/GConf/2.22/GConf-%{version}.tar.bz2 Source: http://download.gnome.org/sources/GConf/2.22/GConf-%{version}.tar.bz2
@ -160,6 +160,10 @@ fi
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%changelog %changelog
* Wed May 21 2008 Ray Strode <rstrode@redhat.com> - 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 <rstrode@redhat.com> - 2.22.0-7 * Wed May 14 2008 Ray Strode <rstrode@redhat.com> - 2.22.0-7
- update add_seconds patch to not remove timeouts that aren't - update add_seconds patch to not remove timeouts that aren't
created anymore created anymore

@ -764,3 +764,36 @@ diff -up /dev/null GConf-2.22.0/gconf/org.gnome.GConf.service.in
dbus_error_init (&bus_error); dbus_error_init (&bus_error);
connection = dbus_bus_get (DBUS_BUS_SESSION, &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;

Loading…
Cancel
Save