summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/devtool/standard.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index a2516d66ac..ed49a936b9 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1304,14 +1304,15 @@ def reset(args, config, basepath, workspace):
1304 if args.all: 1304 if args.all:
1305 raise DevtoolError("Recipe cannot be specified if -a/--all is used") 1305 raise DevtoolError("Recipe cannot be specified if -a/--all is used")
1306 else: 1306 else:
1307 check_workspace_recipe(workspace, args.recipename, checksrc=False) 1307 for recipe in args.recipename:
1308 check_workspace_recipe(workspace, recipe, checksrc=False)
1308 elif not args.all: 1309 elif not args.all:
1309 raise DevtoolError("Recipe must be specified, or specify -a/--all to " 1310 raise DevtoolError("Recipe must be specified, or specify -a/--all to "
1310 "reset all recipes") 1311 "reset all recipes")
1311 if args.all: 1312 if args.all:
1312 recipes = list(workspace.keys()) 1313 recipes = list(workspace.keys())
1313 else: 1314 else:
1314 recipes = [args.recipename] 1315 recipes = args.recipename
1315 1316
1316 if recipes and not args.no_clean: 1317 if recipes and not args.no_clean:
1317 if len(recipes) == 1: 1318 if len(recipes) == 1:
@@ -1449,9 +1450,9 @@ def register_commands(subparsers, context):
1449 parser_status.set_defaults(func=status) 1450 parser_status.set_defaults(func=status)
1450 1451
1451 parser_reset = subparsers.add_parser('reset', help='Remove a recipe from your workspace', 1452 parser_reset = subparsers.add_parser('reset', help='Remove a recipe from your workspace',
1452 description='Removes the specified recipe from your workspace (resetting its state)', 1453 description='Removes the specified recipe(s) from your workspace (resetting its state back to that defined by the metadata).',
1453 group='working', order=-100) 1454 group='working', order=-100)
1454 parser_reset.add_argument('recipename', nargs='?', help='Recipe to reset') 1455 parser_reset.add_argument('recipename', nargs='*', help='Recipe to reset')
1455 parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)') 1456 parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)')
1456 parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output') 1457 parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
1457 parser_reset.set_defaults(func=reset) 1458 parser_reset.set_defaults(func=reset)