[PATCH modular 2/3 (v3)] jhbuild: Support skipping packages on a per-architecture basis.

Cyril Brulebois kibi at debian.org
Tue Nov 16 08:43:46 PST 2010


Thanks to an execfile() in jhbuildrc, allow managing packages to be
skipped on this or that architecture to be listed in an external file.

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 arch.skip |   24 ++++++++++++++++++++++++
 jhbuildrc |    8 +++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
 create mode 100644 arch.skip

diff --git a/arch.skip b/arch.skip
new file mode 100644
index 0000000..eba055d
--- /dev/null
+++ b/arch.skip
@@ -0,0 +1,24 @@
+# This module is supposed to be execfile()'d from jhbuildrc. It appends
+# elements to the 'skip' variable depending on the detected architecture.
+#
+# For code clarity's sake, some variables are used in this file. To prevent
+# jhbuild from complaining about keys it doesn't know about, they are prefixed
+# with an underscore.
+#
+# To determine your architecture, run this:
+#     python -c 'import os; print os.uname()[4]'
+#
+# There might be better ways to detect the architecture. Patches welcome.
+
+import os
+_current_arch = os.uname()[4]
+
+# Dictionary: arch => list of packages to skip
+_arch_blacklist = {
+  'x86_64': ['xf86-video-geode',  # not on 64-bit   (#26341)
+            ],
+}
+
+# No package to skip if the architecture isn't known:
+if _arch_blacklist.has_key(_current_arch):
+    skip.extend(_arch_blacklist[_current_arch])
diff --git a/jhbuildrc b/jhbuildrc
index e10c8bf..0063dc8 100644
--- a/jhbuildrc
+++ b/jhbuildrc
@@ -10,7 +10,8 @@
 
 #moduleset = 'http://cgit.freedesktop.org/xorg/util/modular/blob/xorg.modules'
 # Requires the module set be in $HOME/xorg/util/modular/
-moduleset = os.path.join(os.environ['HOME'], 'xorg', 'util', 'modular', 'xorg.modules')
+_modular_root = os.path.join(os.environ['HOME'], 'xorg', 'util', 'modular')
+moduleset = os.path.join(_modular_root, 'xorg.modules')
 
 modules = [ 'xorg' ]
 
@@ -26,3 +27,8 @@ os.environ['PKG_CONFIG_PATH'] = os.path.join(prefix, 'lib', 'pkgconfig') \
 
 # Needed to configure libdrm for xf86-video-nouveau:
 module_autogenargs['libdrm'] = autogenargs + ' --enable-nouveau-experimental-api'
+
+# Skip some packages depending on the architecture: executing the file sets
+# 'skip', the variable used by jhbuild. It can be tweaked in several ways,
+# e.g.:  skip.append('xorg-drivers')  or  skip.extend(['xset', 'xvinfo'])
+execfile(os.path.join(_modular_root, 'arch.skip'))
-- 
1.7.2.3



More information about the xorg-devel mailing list