[OE-core] [PATCH v2] devtool: add sync command
Paul Eggleton
paul.eggleton at linux.intel.com
Mon Nov 9 10:12:39 UTC 2015
On Friday 06 November 2015 21:10:10 Tzu-Jung Lee wrote:
> The sync command is similar to the extract command, except it
> fetches the sync'ed and patched branch to an existing git repository.
>
> This enables users to keep track the upstream development while
> maintaining their own local git repository at the same time.
>
> Signed-off-by: Tzu-Jung Lee <roylee17 at currantlabs.com>
>
> diff --git a/scripts/lib/devtool/standard.py
> b/scripts/lib/devtool/standard.py index c5c647b..8efd262 100644
> --- a/scripts/lib/devtool/standard.py
> +++ b/scripts/lib/devtool/standard.py
> @@ -238,7 +238,29 @@ def extract(args, config, basepath, workspace):
> return 1
>
> srctree = os.path.abspath(args.srctree)
> - initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd)
> + initial_rev = _extract_source(srctree, args.keep_temp, args.branch,
> False, rd) + logger.info('Source tree extracted to %s' % srctree)
> +
> + if initial_rev:
> + return 0
> + else:
> + return 1
> +
> +def sync(args, config, basepath, workspace):
> + """Entry point for the devtool 'sync' subcommand"""
> + import bb
> +
> + tinfoil = _prep_extract_operation(config, basepath, args.recipename)
> + if not tinfoil:
> + # Error already shown
> + return 1
> +
> + rd = parse_recipe(config, tinfoil, args.recipename, True)
> + if not rd:
> + return 1
> +
> + srctree = os.path.abspath(args.srctree)
> + initial_rev = _extract_source(srctree, args.keep_temp, args.branch,
> True, rd) logger.info('Source tree extracted to %s' % srctree)
>
> if initial_rev:
> @@ -293,7 +315,7 @@ def _prep_extract_operation(config, basepath,
> recipename): return tinfoil
>
>
> -def _extract_source(srctree, keep_temp, devbranch, d):
> +def _extract_source(srctree, keep_temp, devbranch, sync, d):
You're changing this function but you missed updating one call in
scripts/lib/devtool/upgrade.py. (I know, the name starting with _ implies it's
internal, but we're also using it there as well).
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list