[PATCH modular 2/3] jhbuildrc: Support skipping packages on a per-architecture basis.

Cyril Brulebois kibi at debian.org
Sat Nov 13 16:50:55 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
(by default, adding '.skip' to the name of the file listing all the
modules).

Do not forget to use 'del' here and there to prevent jhbuild from
complaining about unknown keys:
| I: unknown keys defined in configuration file: foo

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 jhbuildrc         |    9 +++++++++
 xorg.modules.skip |   29 +++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100644 xorg.modules.skip

diff --git a/jhbuildrc b/jhbuildrc
index d178dcd..551aafa 100644
--- a/jhbuildrc
+++ b/jhbuildrc
@@ -28,3 +28,12 @@ os.environ['PKG_CONFIG_PATH'] = os.path.join(prefix, 'lib', 'pkgconfig') \
 module_autogenargs = {
   'libdrm': '--enable-nouveau-experimental-api',
 }
+
+# Skip some packages depending on the architecture: executing the file sets
+# 'arch_skip' (using the known blacklist and 'uname'), which can then be used
+# to define 'skip', the variable used by jhbuild. Calling 'del' on the extra
+# 'arch_skip' prevents jhbuild from complaining about a key it doesn't know
+# about. 'skip' can be adjusted, e.g. by using append() to skip more packages.
+execfile(moduleset+'.skip')
+skip = arch_skip; del arch_skip
+#skip.append('extra_package')
diff --git a/xorg.modules.skip b/xorg.modules.skip
new file mode 100644
index 0000000..1e56fa9
--- /dev/null
+++ b/xorg.modules.skip
@@ -0,0 +1,29 @@
+# This module is supposed to be execfile()'d from jhbuildrc. It sets the
+# 'arch_skip' variable for use from that configuration file.
+#
+# For code clarity's sake, some variables are used in this file. To prevent
+# jhbuild from complaining about keys it doesn't know about, 'del' is called
+# at the end to pretend they never existed.
+#
+# 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)
+             'xf86-video-impact', # not on non-MIPS (#26342)
+             'xf86-video-sunbw2', # dead            (#26343)
+            ],
+}
+
+# No package to skip if the architecture isn't known:
+arch_skip = arch_blacklist[current_arch] if arch_blacklist.has_key(current_arch) else []
+
+# Clean-up for jhbuild:
+del arch_blacklist
+del current_arch
-- 
1.7.2.3



More information about the xorg-devel mailing list