[OE-core] [PATCH v2 2/2] combo-layer: support updating up to arbitrary commit
Paul Eggleton
paul.eggleton at linux.intel.com
Mon Jan 12 11:46:21 UTC 2015
Hi Markus,
On Wednesday 07 January 2015 18:00:42 Markus Lehtonen wrote:
> Support defining the top commit up to which to update. In other words,
> this makes it possible to update up to certain point other than the
> branch head. The update point (git commitish) is given on the command
> line by appending the component name(s) with a colon and the commitish,
> e.g.
> $ combo-layer update my_component:sha1
>
> Only the "update" action supports this.
>
> Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
> ---
> scripts/combo-layer | 22 ++++++++++++++++------
> 1 file changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/combo-layer b/scripts/combo-layer
> index 37d1f47..851003d 100755
> --- a/scripts/combo-layer
> +++ b/scripts/combo-layer
> @@ -26,6 +26,7 @@ import logging
> import subprocess
> import ConfigParser
> import re
> +from collections import OrderedDict
>
> __version__ = "0.2.1"
>
> @@ -347,7 +348,13 @@ def action_update(conf, args):
> generate the patch list
> apply the generated patches
> """
> - repos = get_repos(conf, args[1:])
> + components = [arg.split(':')[0] for arg in args[1:]]
> + revisions = []
> + for arg in args[1:]:
> + revision= arg.split(':', 1)[1] if ':' in arg else None
> + revisions.append(revision)
> + # Map commitishes to repos
> + repos = OrderedDict(zip(get_repos(conf, components), revisions))
>
> # make sure combo repo is clean
> check_repo_clean(os.getcwd())
> @@ -361,9 +368,9 @@ def action_update(conf, args):
> if conf.nopull:
> logger.info("Skipping pull (-n)")
> else:
> - action_pull(conf, args)
> + action_pull(conf, ['arg0'] + components)
What's this 'arg0' ?
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list