diff options
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r-- | scripts/lib/devtool/standard.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index fbc49a9777..741f0ea91b 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -1196,21 +1196,24 @@ def reset(args, config, basepath, workspace): | |||
1196 | raise DevtoolError("Recipe must be specified, or specify -a/--all to " | 1196 | raise DevtoolError("Recipe must be specified, or specify -a/--all to " |
1197 | "reset all recipes") | 1197 | "reset all recipes") |
1198 | if args.all: | 1198 | if args.all: |
1199 | recipes = workspace | 1199 | recipes = workspace.keys() |
1200 | else: | 1200 | else: |
1201 | recipes = [args.recipename] | 1201 | recipes = [args.recipename] |
1202 | 1202 | ||
1203 | for pn in recipes: | 1203 | if recipes and not args.no_clean: |
1204 | if not args.no_clean: | 1204 | if len(recipes) == 1: |
1205 | logger.info('Cleaning sysroot for recipe %s...' % pn) | 1205 | logger.info('Cleaning sysroot for recipe %s...' % recipes[0]) |
1206 | try: | 1206 | else: |
1207 | exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % pn) | 1207 | logger.info('Cleaning sysroot for recipes %s...' % ', '.join(recipes)) |
1208 | except bb.process.ExecutionError as e: | 1208 | try: |
1209 | raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you ' | 1209 | exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % ' '.join(recipes)) |
1210 | 'wish, you may specify -n/--no-clean to ' | 1210 | except bb.process.ExecutionError as e: |
1211 | 'skip running this command when resetting' % | 1211 | raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you ' |
1212 | (e.command, e.stdout)) | 1212 | 'wish, you may specify -n/--no-clean to ' |
1213 | 'skip running this command when resetting' % | ||
1214 | (e.command, e.stdout)) | ||
1213 | 1215 | ||
1216 | for pn in recipes: | ||
1214 | _check_preserve(config, pn) | 1217 | _check_preserve(config, pn) |
1215 | 1218 | ||
1216 | preservepath = os.path.join(config.workspace_path, 'attic', pn) | 1219 | preservepath = os.path.join(config.workspace_path, 'attic', pn) |