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 654768 - XDG_DATA_DIRS in jhbuild/config.py breaks build (at least on stock lucid)
XDG_DATA_DIRS in jhbuild/config.py breaks build (at least on stock lucid)
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2011-07-17 06:34 UTC by Jason Holt
Modified: 2011-07-17 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jason Holt 2011-07-17 06:34:59 UTC
Trying to build gtk+ using jhbuild on a brand new lucid install and the sample .jhbuildrc with different install paths.

Running "jhbuild build gtk+", I got this error while building gtk+/gdk:
/usr/share/gir-1.0/GdkPixbuf-2.0.gir: Incompatible version 1.0 (supported: 1.2)

We traced the problem to jhbuild/config.py, which sets XDG_DATA_DIRS around line 368.  Prepending /usr/share to XDG_DATA_DIRS means that the system data dirs take precedence, and thus the GdkPixbuf compiled by jhbuild doesn't get detected.

Commenting out the XDG_DATA_DIRS stuff and adding this to my .jhbuildrc solved the problem:
addpath('XDG_DATA_DIRS', os.path.join(prefix, 'share'))
addpath('XDG_DATA_DIRS', os.path.join(prefix, 'usr/share'))

Also, it looks to me like there's a bug in the XDG_CONFIG_DIRS around line 378, where it prepends /etc to XDG_DATA_DIRS instead of XDG_CONFIG_DIRS.

The really weird thing to me is that I see this bug at all.  Is it unusual to be compiling with jhbuild on a stock ubuntu lucid machine?  I would have thought that would be an extremely common case.
Comment 1 Colin Walters 2011-07-17 14:51:07 UTC
commit 9a3852fa592e5bb5f3b0ad6e07f3215364086481
Author: Colin Walters <walters@verbum.org>
Date:   Sun Jul 17 10:49:17 2011 -0400

    config: Correctly order XDG_DATA_DIRS when doing a partial build
    
    Surprisingly, addpath() prepends.  We need to ensure the system paths
    are after, not before.
    
    Also, fix bad copy&paste for XDG_CONFIG_DIRS.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=654768