GNOME Bugzilla – Bug 720118
improve jhbuild paths manipulation
Last modified: 2014-01-02 15:57:44 UTC
jhbuild sets a bunch of things like XDG_DATA_DIRS, PKG_CONFIG_PATH, XDG_CONFIG_DIRS, GI_TYPELIB_PATH, etc. but there are some deficiencies in how it does so. For example, the basedir spec says that the default value of XDG_DATA_DIRS is /usr/local/share:/usr/share but jhbuild defaults to only /usr/share. Another example is GI_TYPELIB_PATH getting set to /usr/lib or /usr/lib64 depending on the value of 'use_lib64', which is a bit strange -- why should our preference of if we use lib64 or not have anything to do with where we search for things on the system? We should query the default typelib path out of the system-installed gobject-introspection.
The default XDG_DATA_DIRS should be ${prefix}/share:/usr/local/share:/usr/share Any change to use the system-installed gobject-introspection should be prepared to handle the case where there isn't one, because jhbuild is being used to create it along with the rest of the Gtk stack.
Created attachment 265113 [details] [review] config: fix XDG basedir compliance quoth the spec: If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used. If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used.
Comment on attachment 265113 [details] [review] config: fix XDG basedir compliance ok. (even as I'm not quite sure about the partial_build integration)
Attachment 265113 [details] pushed as ee3d23c - config: fix XDG basedir compliance Consulting partial_build here to decide if we should respect the XDG spec or not was completely bogus. I think it may have been a leftover from a period where it was reasonably possible to jhbuild a system with absolutely no help from any underlying component whatsoever. In the modern era this is a testament to just how infrequently people turn off partial_build -- any component from /usr that we included in the build that tried to find its own data files would fail (and even with partial_build off, there are a lot of those).