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

Dan Nicholson dbn.lists at gmail.com
Sun Nov 14 08:08:12 PST 2010


On Sat, Nov 13, 2010 at 4:50 PM, Cyril Brulebois <kibi at debian.org> 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
> (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>

Ooh, very clever.

> ---
>  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')

Why not just have it set skip since you already have the comment to
use append() to add more packages? Then you don't have to worry about
arch_skip being deleted.

> diff --git a/xorg.modules.skip b/xorg.modules.skip
> new file mode 100644
> index 0000000..1e56fa9
> --- /dev/null
> +++ b/xorg.modules.skip

I think it would be a little nicer to call this "arch.skip" or
something rather than moduleset + ".skip". This particular fix is
generic to any xorg moduleset and would keep you from having to copy
the file if you want to create a new custom moduleset.

--
Dan


More information about the xorg-devel mailing list