aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-07 00:15:51 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 15:41:32 +0000
commitd64a5794098e9ca715a70daa704f571ba97e9912 (patch)
treef05f33d06e8b4b896e2ddc8a53572f188ea37ea9 /scripts
parentd9c5653f994e0f366c9154a2a988175a9f8e3130 (diff)
downloadopenembedded-core-contrib-d64a5794098e9ca715a70daa704f571ba97e9912.tar.gz
devtool: reset: do clean for multiple recipes at once with -a
We need to run the clean for all recipes that are being reset before we start deleting things from the workspace; if we don't, recipes providing dependencies may be missing when we come to clean a recipe later (since we don't and couldn't practically reset them in dependency order). This also improves performance since we have the startup startup time for the clean just once rather than for every recipe. (From OE-Core master rev: c10a2de75a99410eb5338dd6da0e0b0e32bae6f5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index d9b624d4c7..5464d7b1f2 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1046,21 +1046,24 @@ def reset(args, config, basepath, workspace):
raise DevtoolError("Recipe must be specified, or specify -a/--all to "
"reset all recipes")
if args.all:
- recipes = workspace
+ recipes = workspace.keys()
else:
recipes = [args.recipename]
- for pn in recipes:
- if not args.no_clean:
- logger.info('Cleaning sysroot for recipe %s...' % pn)
- try:
- exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % pn)
- except bb.process.ExecutionError as e:
- raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you '
- 'wish, you may specify -n/--no-clean to '
- 'skip running this command when resetting' %
- (e.command, e.stdout))
+ if recipes and not args.no_clean:
+ if len(recipes) == 1:
+ logger.info('Cleaning sysroot for recipe %s...' % recipes[0])
+ else:
+ logger.info('Cleaning sysroot for recipes %s...' % ', '.join(recipes))
+ try:
+ exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % ' '.join(recipes))
+ except bb.process.ExecutionError as e:
+ raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you '
+ 'wish, you may specify -n/--no-clean to '
+ 'skip running this command when resetting' %
+ (e.command, e.stdout))
+ for pn in recipes:
_check_preserve(config, pn)
preservepath = os.path.join(config.workspace_path, 'attic', pn)