After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586185 - gconf support
gconf support
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on: 586183
Blocks:
 
 
Reported: 2009-06-18 01:02 UTC by Dan Winship
Modified: 2009-06-23 19:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix spelling error in comments (1.58 KB, patch)
2009-06-18 19:02 UTC, Dan Winship
committed Details | Review
Add support for using GConf schemas installed in the jhbuild prefix (2.18 KB, patch)
2009-06-18 19:04 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2009-06-18 01:02:42 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...)
Comment 1 Frederic Peters 2009-06-18 08:43:31 UTC
I am fine with this idea; I'd prefer $prefix/etc/gconf/2/path.jhbuild. I am marking the dependency on the gconf bug.
Comment 2 Dan Winship 2009-06-18 19:02:58 UTC
Created attachment 136935 [details] [review]
Fix spelling error in comments
Comment 3 Dan Winship 2009-06-18 19:04:30 UTC
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).
Comment 4 Frederic Peters 2009-06-23 19:03:58 UTC
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