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

Jeremy Huddleston jeremyhu at apple.com
Sat Mar 26 19:52:56 PDT 2011


Reviving this thread...

I like this idea, but I think we need the logic to be the other way around.  We need to have a mechanism to say that a given module only works on a set of architectures, and skip it if the build arch isn't in that set.

ie (forgive my python as it's not my native tongue, but I think this gets the point across ;>):

_arch_specific = {
  'xf86-video-geode': ['i686'], # Intel only
}

for module, archs in _arch_specific:
    if ! archs.contains(_current_arch):
        skip.extend(module)


On Nov 16, 2010, at 8:43 AM, Cyril Brulebois wrote:

> 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
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list