summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py28
1 files changed, 12 insertions, 16 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 6de24eb524..68d6eb98c5 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1134,8 +1134,8 @@ def reset(args, config, basepath, workspace):
1134def register_commands(subparsers, context): 1134def register_commands(subparsers, context):
1135 """Register devtool subcommands from this plugin""" 1135 """Register devtool subcommands from this plugin"""
1136 parser_add = subparsers.add_parser('add', help='Add a new recipe', 1136 parser_add = subparsers.add_parser('add', help='Add a new recipe',
1137 description='Adds a new recipe') 1137 description='Adds a new recipe to the workspace to build a specified source tree')
1138 parser_add.add_argument('recipename', help='Name for new recipe to add') 1138 parser_add.add_argument('recipename', help='Name for new recipe to add (just name - no version, path or extension)')
1139 parser_add.add_argument('srctree', help='Path to external source tree') 1139 parser_add.add_argument('srctree', help='Path to external source tree')
1140 group = parser_add.add_mutually_exclusive_group() 1140 group = parser_add.add_mutually_exclusive_group()
1141 group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") 1141 group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
@@ -1147,24 +1147,22 @@ def register_commands(subparsers, context):
1147 parser_add.set_defaults(func=add) 1147 parser_add.set_defaults(func=add)
1148 1148
1149 parser_modify = subparsers.add_parser('modify', help='Modify the source for an existing recipe', 1149 parser_modify = subparsers.add_parser('modify', help='Modify the source for an existing recipe',
1150 description='Enables modifying the source for an existing recipe', 1150 description='Enables modifying the source for an existing recipe')
1151 formatter_class=argparse.ArgumentDefaultsHelpFormatter) 1151 parser_modify.add_argument('recipename', help='Name of existing recipe to edit (just name - no version, path or extension)')
1152 parser_modify.add_argument('recipename', help='Name for recipe to edit')
1153 parser_modify.add_argument('srctree', help='Path to external source tree') 1152 parser_modify.add_argument('srctree', help='Path to external source tree')
1154 parser_modify.add_argument('--wildcard', '-w', action="store_true", help='Use wildcard for unversioned bbappend') 1153 parser_modify.add_argument('--wildcard', '-w', action="store_true", help='Use wildcard for unversioned bbappend')
1155 parser_modify.add_argument('--extract', '-x', action="store_true", help='Extract source as well') 1154 parser_modify.add_argument('--extract', '-x', action="store_true", help='Extract source as well')
1156 group = parser_modify.add_mutually_exclusive_group() 1155 group = parser_modify.add_mutually_exclusive_group()
1157 group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") 1156 group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
1158 group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") 1157 group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
1159 parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (only when using -x)') 1158 parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (only when using -x) (default "%(default)s")')
1160 parser_modify.set_defaults(func=modify) 1159 parser_modify.set_defaults(func=modify)
1161 1160
1162 parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe', 1161 parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe',
1163 description='Extracts the source for an existing recipe', 1162 description='Extracts the source for an existing recipe')
1164 formatter_class=argparse.ArgumentDefaultsHelpFormatter) 1163 parser_extract.add_argument('recipename', help='Name of recipe to extract the source for')
1165 parser_extract.add_argument('recipename', help='Name for recipe to extract the source for')
1166 parser_extract.add_argument('srctree', help='Path to where to extract the source tree') 1164 parser_extract.add_argument('srctree', help='Path to where to extract the source tree')
1167 parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout') 1165 parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (default "%(default)s")')
1168 parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') 1166 parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
1169 parser_extract.set_defaults(func=extract, no_workspace=True) 1167 parser_extract.set_defaults(func=extract, no_workspace=True)
1170 1168
@@ -1178,23 +1176,21 @@ def register_commands(subparsers, context):
1178 parser_sync.set_defaults(func=sync) 1176 parser_sync.set_defaults(func=sync)
1179 1177
1180 parser_update_recipe = subparsers.add_parser('update-recipe', help='Apply changes from external source tree to recipe', 1178 parser_update_recipe = subparsers.add_parser('update-recipe', help='Apply changes from external source tree to recipe',
1181 description='Applies changes from external source tree to a recipe (updating/adding/removing patches as necessary, or by updating SRCREV)') 1179 description='Applies changes from external source tree to a recipe (updating/adding/removing patches as necessary, or by updating SRCREV). Note that these changes need to have been committed to the git repository in order to be recognised.')
1182 parser_update_recipe.add_argument('recipename', help='Name of recipe to update') 1180 parser_update_recipe.add_argument('recipename', help='Name of recipe to update')
1183 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') 1181 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')
1184 parser_update_recipe.add_argument('--initial-rev', help='Starting revision for patches') 1182 parser_update_recipe.add_argument('--initial-rev', help='Override starting revision for patches')
1185 parser_update_recipe.add_argument('--append', '-a', help='Write changes to a bbappend in the specified layer instead of the recipe', metavar='LAYERDIR') 1183 parser_update_recipe.add_argument('--append', '-a', help='Write changes to a bbappend in the specified layer instead of the recipe', metavar='LAYERDIR')
1186 parser_update_recipe.add_argument('--wildcard-version', '-w', help='In conjunction with -a/--append, use a wildcard to make the bbappend apply to any recipe version', action='store_true') 1184 parser_update_recipe.add_argument('--wildcard-version', '-w', help='In conjunction with -a/--append, use a wildcard to make the bbappend apply to any recipe version', action='store_true')
1187 parser_update_recipe.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update') 1185 parser_update_recipe.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update')
1188 parser_update_recipe.set_defaults(func=update_recipe) 1186 parser_update_recipe.set_defaults(func=update_recipe)
1189 1187
1190 parser_status = subparsers.add_parser('status', help='Show workspace status', 1188 parser_status = subparsers.add_parser('status', help='Show workspace status',
1191 description='Lists recipes currently in your workspace and the paths to their respective external source trees', 1189 description='Lists recipes currently in your workspace and the paths to their respective external source trees')
1192 formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1193 parser_status.set_defaults(func=status) 1190 parser_status.set_defaults(func=status)
1194 1191
1195 parser_reset = subparsers.add_parser('reset', help='Remove a recipe from your workspace', 1192 parser_reset = subparsers.add_parser('reset', help='Remove a recipe from your workspace',
1196 description='Removes the specified recipe from your workspace (resetting its state)', 1193 description='Removes the specified recipe from your workspace (resetting its state)')
1197 formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1198 parser_reset.add_argument('recipename', nargs='?', help='Recipe to reset') 1194 parser_reset.add_argument('recipename', nargs='?', help='Recipe to reset')
1199 parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)') 1195 parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)')
1200 parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output') 1196 parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')