GNOME Bugzilla – Bug 586185
gconf support
Last modified: 2009-06-23 19:03:58 UTC
Bug 586183 adds support to libgconf for a GCONF_DEFAULT_SOURCE_PATH variable, which lets you override the default gconf source list so that, eg, programs in the jhbuild prefix would be able to find their schemas/default values. I started adding support to this in jhbuild, but it's a little tricker than other environment variables, because you need to actually create a file and point to it, rather than *just* setting an environment variable. So I wasn't quite sure how/where to do that... To generate the new file, you'd basically do perl -pe 'if (m|/etc/gconf|) { $copy = $_; $copy =~ s|/etc/gconf|PREFIX|; print $copy; }' /etc/gconf/2/path or equivalent. (ie, copy /etc/gconf/2/path, and for every line containing "/etc/gconf", precede it with a copy of the line with "/etc/gconf" changed to the jhbuild prefix). This would have to get installed somewhere ($prefix/share/jhbuild/gconf.path? $prefix/etc/gconf/2/path.jhbuild?), but only once, and then setup_env() would just have to set GCONF_DEFAULT_SOURCE_PATH to point to it, and set GCONF_SCHEMA_INSTALL_SOURCE to $prefix/etc/gconf/gconf.xml.defaults so that schema default values would be installed into there. Does this make sense? It's possible we could do a gconf patch that would't require making jhbuild write out a file, but it would be more of a hack on the gconf side. (Basically we'd have to have an environment variable that would tell libgconf to internally do the effect of the above perl script.) (Another possibility would be to have jhbuild write out a temp file and point to that, and then delete it when it exits...)
I am fine with this idea; I'd prefer $prefix/etc/gconf/2/path.jhbuild. I am marking the dependency on the gconf bug.
Created attachment 136935 [details] [review] Fix spelling error in comments
Created attachment 136937 [details] [review] Add support for using GConf schemas installed in the jhbuild prefix Set GCONF_SCHEMA_INSTALL_SOURCE to point into the jhbuild prefix so modules will install their schemas there (rather than failing to install them into /etc). Create a GConf source path file that tells GConf to use the data in the jhbuild prefix (in addition to the data in the system prefix), and point to it with GCONF_DEFAULT_SOURCE_PATH so modules will be read the right data (assuming a new enough libgconf).
As the feature has been added to gconf, I applied your patch and pushed. commit 66125d9106294132e1d0c949ec3aecb89549b2c7 Author: Dan Winship <danw@gnome.org> Date: Thu Jun 18 14:55:14 2009 -0400 Add support for using GConf schemas installed in the jhbuild prefix Set GCONF_SCHEMA_INSTALL_SOURCE to point into the jhbuild prefix so modules will install their schemas there (rather than failing to install them into /etc). Create a GConf source path file that tells GConf to use the data in the jhbuild prefix (in addition to the data in the system prefix), and point to it with GCONF_DEFAULT_SOURCE_PATH so modules will be read the right data (assuming a new enough libgconf). http://bugzilla.gnome.org/show_bug.cgi?id=586185