[jhbuild/wip/sysdeps-rebase2: 5/5] config.py: If partial_build is set, explicitly include system paths
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/wip/sysdeps-rebase2: 5/5] config.py: If partial_build is set, explicitly include system paths
- Date: Fri, 15 Jul 2011 18:26:05 +0000 (UTC)
commit c59d3d328482624be173bc3cbfe63ef0fc527e16
Author: Colin Walters <walters verbum org>
Date: Thu Jul 14 16:39:18 2011 -0400
config.py: If partial_build is set, explicitly include system paths
Previously, the way config.py handled environment variables was
inconsistent. For some of them (e.g. PKG_CONFIG_PATH), we always
included the system path. For others (e.g. XDG_DATA_DIRS), we didn't.
For still others, it's not (easily) possible for us to exclude the
system, even if we wanted to (e.g. LD_LIBRARY_PATH), so we just
inherit by default.
At a high level, people doing partial builds *definitely* want system
paths. In particular, if you're doing a partial build of gnome-shell,
you won't get any system applications unless you set XDG_DATA_DIRS.
https://bugzilla.gnome.org/show_bug.cgi?id=564373
jhbuild/config.py | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 0488a16..7c9d39b 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -344,12 +344,7 @@ class Config:
addpath('INFOPATH', infopathdir)
# PKG_CONFIG_PATH
- if os.environ.get('PKG_CONFIG_PATH') is None:
- # add system pkgconfig lookup-directories by default, as pkg-config
- # usage spread and is now used by libraries that are out of jhbuild
- # realm; this also helps when building a single module with
- # jhbuild. It is possible to avoid this by setting PKG_CONFIG_PATH
- # to the empty string.
+ if os.environ.get('PKG_CONFIG_PATH') is None and self.partial_build:
for dirname in ('share', 'lib', 'lib64'):
full_name = '/usr/%s/pkgconfig' % dirname
if os.path.exists(full_name):
@@ -373,10 +368,14 @@ class Config:
# XDG_DATA_DIRS
xdgdatadir = os.path.join(self.prefix, 'share')
addpath('XDG_DATA_DIRS', xdgdatadir)
+ if self.partial_build:
+ addpath('XDG_DATA_DIRS', '/usr/share')
# XDG_CONFIG_DIRS
xdgconfigdir = os.path.join(self.prefix, 'etc', 'xdg')
addpath('XDG_CONFIG_DIRS', xdgconfigdir)
+ if self.partial_build:
+ addpath('XDG_DATA_DIRS', '/etc')
# XCURSOR_PATH
xcursordir = os.path.join(self.prefix, 'share', 'icons')
@@ -389,10 +388,11 @@ class Config:
os.makedirs(aclocaldir)
except:
raise FatalError(_("Can't create %s directory") % aclocaldir)
- if os.path.exists('/usr/share/aclocal'):
- addpath('ACLOCAL_FLAGS', '/usr/share/aclocal')
- if os.path.exists('/usr/local/share/aclocal'):
- addpath('ACLOCAL_FLAGS', '/usr/local/share/aclocal')
+ if self.partial_build:
+ if os.path.exists('/usr/share/aclocal'):
+ addpath('ACLOCAL_FLAGS', '/usr/share/aclocal')
+ if os.path.exists('/usr/local/share/aclocal'):
+ addpath('ACLOCAL_FLAGS', '/usr/local/share/aclocal')
addpath('ACLOCAL_FLAGS', aclocaldir)
# PERL5LIB
@@ -402,7 +402,7 @@ class Config:
# These two variables are so that people who use "jhbuild shell"
# can tweak their shell prompts and such to show "I'm under jhbuild".
# The first variable is the obvious one to look for; the second
- # one is for historical reasons.
+ # one is for historical reasons.
os.environ['UNDER_JHBUILD'] = 'true'
os.environ['CERTIFIED_GNOMIE'] = 'yes'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]