summaryrefslogtreecommitdiffstats
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:51:41 +0000
commitb171076f46dd54a8ae2a9ee90a5e2debde1015a8 (patch)
tree4768b47dc03aafd365afb3cbf37278c834408d73 /scripts
parent255115f6e4b820ef5fe1c7092366e4c68dbfb0b6 (diff)
downloadpoky-b171076f46dd54a8ae2a9ee90a5e2debde1015a8.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) (From OE-Core rev: d64a5794098e9ca715a70daa704f571ba97e9912) 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):
1046 raise DevtoolError("Recipe must be specified, or specify -a/--all to " 1046 raise DevtoolError("Recipe must be specified, or specify -a/--all to "
1047 "reset all recipes") 1047 "reset all recipes")
1048 if args.all: 1048 if args.all:
1049 recipes = workspace 1049 recipes = workspace.keys()
1050 else: 1050 else:
1051 recipes = [args.recipename] 1051 recipes = [args.recipename]
1052 1052
1053 for pn in recipes: 1053 if recipes and not args.no_clean:
1054 if not args.no_clean: 1054 if len(recipes) == 1:
1055 logger.info('Cleaning sysroot for recipe %s...' % pn) 1055 logger.info('Cleaning sysroot for recipe %s...' % recipes[0])
1056 try: 1056 else:
1057 exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % pn) 1057 logger.info('Cleaning sysroot for recipes %s...' % ', '.join(recipes))
1058 except bb.process.ExecutionError as e: 1058 try:
1059 raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you ' 1059 exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % ' '.join(recipes))
1060 'wish, you may specify -n/--no-clean to ' 1060 except bb.process.ExecutionError as e:
1061 'skip running this command when resetting' % 1061 raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you '
1062 (e.command, e.stdout)) 1062 'wish, you may specify -n/--no-clean to '
1063 'skip running this command when resetting' %
1064 (e.command, e.stdout))
1063 1065
1066 for pn in recipes:
1064 _check_preserve(config, pn) 1067 _check_preserve(config, pn)
1065 1068
1066 preservepath = os.path.join(config.workspace_path, 'attic', pn) 1069 preservepath = os.path.join(config.workspace_path, 'attic', pn)