From e3cfb80f1e5df809663ec2cd63171e6fe7f78c04 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 4 Mar 2015 12:46:29 +0000 Subject: devtool: name command line parsers appropriately No functional changes, just use a unique name for each parser. (From OE-Core rev: 5fabc59d6221c3fe7137b70e31ec2761a4276a6c) Signed-off-by: Paul Eggleton Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- scripts/lib/devtool/standard.py | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'scripts/lib/devtool/standard.py') diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index cabf3fe..435878c 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1,6 +1,6 @@ # Development tool - standard commands plugin # -# Copyright (C) 2014 Intel Corporation +# Copyright (C) 2014-2015 Intel Corporation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -602,33 +602,33 @@ def register_commands(subparsers, context): parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)') parser_add.set_defaults(func=add) - parser_add = subparsers.add_parser('modify', help='Modify the source for an existing recipe', + parser_modify = subparsers.add_parser('modify', help='Modify the source for an existing recipe', description='Enables modifying the source for an existing recipe', formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser_add.add_argument('recipename', help='Name for recipe to edit') - parser_add.add_argument('srctree', help='Path to external source tree') - parser_add.add_argument('--wildcard', '-w', action="store_true", help='Use wildcard for unversioned bbappend') - parser_add.add_argument('--extract', '-x', action="store_true", help='Extract source as well') - parser_add.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") - parser_add.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (only when using -x)') - parser_add.set_defaults(func=modify) - - parser_add = subparsers.add_parser('extract', help='Extract the source for an existing recipe', + parser_modify.add_argument('recipename', help='Name for recipe to edit') + parser_modify.add_argument('srctree', help='Path to external source tree') + parser_modify.add_argument('--wildcard', '-w', action="store_true", help='Use wildcard for unversioned bbappend') + parser_modify.add_argument('--extract', '-x', action="store_true", help='Extract source as well') + parser_modify.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") + parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (only when using -x)') + parser_modify.set_defaults(func=modify) + + parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe', description='Extracts the source for an existing recipe', formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser_add.add_argument('recipename', help='Name for recipe to extract the source for') - parser_add.add_argument('srctree', help='Path to where to extract the source tree') - parser_add.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout') - parser_add.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') - parser_add.set_defaults(func=extract) + parser_extract.add_argument('recipename', help='Name for recipe to extract the source for') + parser_extract.add_argument('srctree', help='Path to where to extract the source tree') + parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout') + parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') + parser_extract.set_defaults(func=extract) - parser_add = subparsers.add_parser('update-recipe', help='Apply changes from external source tree to recipe', + parser_update_recipe = subparsers.add_parser('update-recipe', help='Apply changes from external source tree to recipe', description='Applies changes from external source tree to a recipe (updating/adding/removing patches as necessary, or by updating SRCREV)') - parser_add.add_argument('recipename', help='Name of recipe to update') - parser_add.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE') - parser_add.add_argument('--initial-rev', help='Starting revision for patches') - parser_add.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update') - parser_add.set_defaults(func=update_recipe) + parser_update_recipe.add_argument('recipename', help='Name of recipe to update') + parser_update_recipe.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE') + parser_update_recipe.add_argument('--initial-rev', help='Starting revision for patches') + parser_update_recipe.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update') + parser_update_recipe.set_defaults(func=update_recipe) parser_status = subparsers.add_parser('status', help='Show workspace status', description='Lists recipes currently in your workspace and the paths to their respective external source trees', -- cgit v1.1