[oe-commits] [openembedded-core] 22/26: devtool: reset: allow specifying multiple recipes

git at git.openembedded.org git at git.openembedded.org
Mon Jun 13 10:53:32 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 338d644bcbe5e3863c2117c7d6a421c615838bb1
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Mon Jun 13 16:43:40 2016 +1200

    devtool: reset: allow specifying multiple recipes
    
    Allow specifying more than one recipe on the devtool reset command line.
    
    Also tweak the help text slightly.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/devtool/standard.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index a2516d6..ed49a93 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1304,14 +1304,15 @@ def reset(args, config, basepath, workspace):
         if args.all:
             raise DevtoolError("Recipe cannot be specified if -a/--all is used")
         else:
-            check_workspace_recipe(workspace, args.recipename, checksrc=False)
+            for recipe in args.recipename:
+                check_workspace_recipe(workspace, recipe, checksrc=False)
     elif not args.all:
         raise DevtoolError("Recipe must be specified, or specify -a/--all to "
                            "reset all recipes")
     if args.all:
         recipes = list(workspace.keys())
     else:
-        recipes = [args.recipename]
+        recipes = args.recipename
 
     if recipes and not args.no_clean:
         if len(recipes) == 1:
@@ -1449,9 +1450,9 @@ def register_commands(subparsers, context):
     parser_status.set_defaults(func=status)
 
     parser_reset = subparsers.add_parser('reset', help='Remove a recipe from your workspace',
-                                         description='Removes the specified recipe from your workspace (resetting its state)',
+                                         description='Removes the specified recipe(s) from your workspace (resetting its state back to that defined by the metadata).',
                                          group='working', order=-100)
-    parser_reset.add_argument('recipename', nargs='?', help='Recipe to reset')
+    parser_reset.add_argument('recipename', nargs='*', help='Recipe to reset')
     parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)')
     parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
     parser_reset.set_defaults(func=reset)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list