diff options
-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 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) |