X-JHBuild: A thin JHBuild wrapper with plug-ins.

Dirk Wallenstein halsmit at t-online.de
Thu May 13 01:45:26 PDT 2010


I've improved diverse things. I've added hooks for jhbuild commands. The
cwd-module adaption works, except that there's a stub, that has yet to
be implemented, for repos where the basename doesn't match (and a
modules file adaption would be ambiguous, like 'util'). As the current
adaption relies on git anyway, I think, I'll use a git-config setting.

There are visual improvements, and there are no longer quotes in ACLOCAL
and the callback environment variable -- that was producing failures in
some cases. Also, there are two new internal commands, that facilitate
creation of plug-ins and hooks. 

Regarding externally managed modules files:
There appear two be two ways to access them. Online through an URL or
through the modular repo. I thought about specifying them with a 'o:'
and 'r:' preamble respectively.
        o:xorg
        o:another
        r:xorg
        r:another
This way, for the local repos, there could be an informational dialog
('Wanna clone?'), before cloning them, if the user does not have them,
yet. It's also easy to switch between them. For the URLs this
indirection would allow to move the online-location.
The idea is to insert the tokens into URL- and path-templates. So there
would be no need to register them in X-JHBuild, and always lag behind.
There would just have to be a particular location for module files --
like util/modular.
Maybe there could be a separate repo for modules files. You can override
targets, and so there could be one general modules file (xorg.modules)
and if someone has a topic that touches multiple modules, it would be
possible to create a topic-modules-file that includes the general one
and overrides the necessary targets. A user would just switch the
modules file to 'o:topic'.

I was wondering if this qualifies for a fd.o repo, and so I have posted
an account request.
https://bugs.freedesktop.org/show_bug.cgi?id=28048
So, if someone likes this effort, ... or histories in general...
I'm also open for criticism.

Greetings,
Dirk
-------------- next part --------------
commit 7601dc26e9036cf152f7ff1c6d5cdcd3edcb1eed
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Wed May 12 19:34:03 2010

    Rephrase config parsing error message.
    
    There can be more 'name errors' than missing variable definitions.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit e23f9cd05ff3e95e956a5e428d02c9709cd94c2d
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Wed May 12 17:38:12 2010

    Avoid quotes in the callback env-var.
    
    To allow a callback without 'eval', the callback environment variable,
    does no longer contain quoted configuration and moduleset tokens. The
    use of whitespace in these tokens is flagged as an error.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit b7fede3c2dc3b4c4f218cd0e0242a8690446924b
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Wed May 12 15:21:42 2010

    hooks: Add the example hook 'pre-build'
    
    This hooks will list all affected modules, and ask for confirmation.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit 179929cbd9a26b5972056ceba1db613b323a0814
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Wed May 12 15:11:32 2010

    Add internal subcommand 'expand-modules'
    
    This subcommand can be given a jhbuild secondary command line, and it
    will output a list of modules that would be affected by that command.
    This is useful for hooks, as they might often want to know if a
    particular module is affected. As an example, the 'post-build' hook
    could simply execute the following command to see if the server has been
    build:
    ${XJHBUILD_CALLBACK} expand-modules build "${@}" | grep xserver
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit a9ad73b254dc52b6bc17dfe69afc3a799475e037
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Wed May 12 15:04:22 2010

    Add internal subcommand 'print-cwd-module'
    
    This subcommand just wraps the cwd-module adaption and prints the
    module-id on stdout. This will be useful for plug-ins, as they don't get
    the adapted command line automatically.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit 18cc4c7093a659466e1d6e29a2087eedf470d7a3
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Mon May 10 20:19:29 2010

    Add the cwd-module to the command line
    
    If no modules are specified on the command line, the module of the
    current working directory will be appended. An additional option allows
    to select the modules from the configuration file.
    This behavior can be completely reversed by by changing a configuration
    value.
    
    This implementation relies on the predominant fact, that the module-id
    corresponds to the repository root basename. It is currently not clear
    how a module id will be determined, if the module id and the directory
    name deviate.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit ae67944bea8845fef8579639a02b02ded328b29d
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Mon May 10 20:10:12 2010

    Add a jhbuild command option parser
    
    This secondary option parser just determines what options are present on
    the command line, and allows to reassemble parts of the options into a
    new command line.
    
    Necessity:
    To add the cwd-module to a command line, it must be known if there are
    already modules given on the command line. This parser will make that
    very easy.
    Hooks often need to know, which modules are affected by a command line.
    In a future version, hooks will be able to do that with a simple
    callback, without the need to parse the command line themselves.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit c7ccacdd9cdc7ee26ef67d47dc2e4820ff490415
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Mon May 10 14:43:43 2010

    modules: Add an example modules file that includes xorg.modules
    
    The new modules file my.modules demonstrates how to include a remote or
    local modules file and extent it with own configurations. This example
    will add apps and fonts that are in build.sh but are missing in the
    current xorg.modules in the most simplistic way -- use a very coarse
    dependency granularity for all equally.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit e7e3f745115fba2c9eb4ecdf0601a8f464a637c1
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Sun May 9 17:48:12 2010

    Don't quote paths in ACLOCAL
    
    aclocal may have problems if there are quoted paths in ACLOCAL.
    Therefore this will omit the quotes in ACLOCAL and demand from the user
    to specify a prefix path without whitespace.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit 2fe5cce1422a7c7840e518b82698f4646d59fa07
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Fri May 7 21:01:47 2010

    Support for jhbuild command hooks
    
    It is now possible to create pre/post hooks for every jhbuild command.
    pre-hooks can prevent the jhbuild call. post-hooks won't get executed if
    the jhbuild call fails.
    
    Hooks are located in the 'hooks' sub-directory and are named after their
    jhbuild command, with a 'pre-' or 'post-' prefix. They have access to
    the same environment variables as plug-ins do.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit c5d1d9dbb2c367444f5dc94b85197e4534cbe835
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Fri May 7 16:04:17 2010

    config: Add comment about the augmentation of env-vars
    
    The problem with augmentation of environment variables is also present
    in configuration files. Add a comment noting that.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit e513294aebe620fedb8a504d180515b935f98ab6
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Fri May 7 20:44:06 2010

    Regroup functions and visual changes
    
    No behavioral changes. Just code block movement.
    
    This groups all environment modifying functions into one section and
    changes the section headers.
    
    It also adds a comment saying why ACLOCAL and PKG_CONFIG_PATH can only
    be modified once, immediately before a jhbuild call. Plug-ins might
    change the selected configuration and the variables might be augmented.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit 0687e769e8d3ad0889b3e26dafcb801138157a3b
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Fri May 7 20:30:42 2010

    Always set the x-jhbuild env-vars at program start.
    
    The xjhbuild environment variables should be available to hooks, too.
    Rename the corresponding function to reflect its more general use.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>

commit 125bd9555d62118c7577c263206299b8b71312d0
Author: Dirk Wallenstein <halsmit at t-online.de>
Date:   Fri May 7 20:24:57 2010

    Make the implicit jhbuild-command 'build' explicit
    
    This will streamline processing when hooks are added.
    
    Personally, I would like it to be turned off. A future version will
    probably make it configurable, which command or plugin to use
    implicitly.
    
    Signed-off-by: Dirk Wallenstein <halsmit at t-online.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x-jhbuild-0.1.1.tar.bz2
Type: application/x-bzip2
Size: 28240 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100513/62c3a6f4/attachment-0001.bin>


More information about the xorg-devel mailing list