* [PATCH 0/2] devtool/recipetool command-line help fixes
@ 2015-02-05 14:03 Paul Eggleton
2015-02-05 14:03 ` [PATCH 1/2] devtool: improve command-line help Paul Eggleton
2015-02-05 14:04 ` [PATCH 2/2] recipetool: " Paul Eggleton
0 siblings, 2 replies; 3+ messages in thread
From: Paul Eggleton @ 2015-02-05 14:03 UTC (permalink / raw)
To: openembedded-core
The following changes since commit eb9d896db2fc67bac8efd258744d06fbbee87f06:
libtool: avoid running automake/autoconf --version (2015-02-05 09:45:49 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/devtool-cmdline-help
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/devtool-cmdline-help
Paul Eggleton (2):
devtool: improve command-line help
recipetool: improve command-line help
scripts/devtool | 18 ++++++++++--------
scripts/lib/devtool/standard.py | 13 ++++++++++---
scripts/lib/recipetool/create.py | 8 +++++---
scripts/recipetool | 6 +++---
4 files changed, 28 insertions(+), 17 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] devtool: improve command-line help
2015-02-05 14:03 [PATCH 0/2] devtool/recipetool command-line help fixes Paul Eggleton
@ 2015-02-05 14:03 ` Paul Eggleton
2015-02-05 14:04 ` [PATCH 2/2] recipetool: " Paul Eggleton
1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2015-02-05 14:03 UTC (permalink / raw)
To: openembedded-core
Based on feedback from Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/devtool | 18 ++++++++++--------
scripts/lib/devtool/standard.py | 13 ++++++++++---
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/scripts/devtool b/scripts/devtool
index d6e1b97..981ff51 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -112,8 +112,8 @@ def read_workspace():
break
def create_workspace(args, config, basepath, workspace):
- if args.directory:
- workspacedir = os.path.abspath(args.directory)
+ if args.layerpath:
+ workspacedir = os.path.abspath(args.layerpath)
else:
workspacedir = os.path.abspath(os.path.join(basepath, 'workspace'))
_create_workspace(workspacedir, config, basepath, args.create_only)
@@ -177,18 +177,20 @@ def main():
pth = os.path.dirname(pth)
parser = argparse.ArgumentParser(description="OpenEmbedded development tool",
- epilog="Use %(prog)s <command> --help to get help on a specific command")
+ epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
parser.add_argument('--basepath', help='Base directory of SDK / build directory')
parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
- parser.add_argument('--color', help='Colorize output', choices=['auto', 'always', 'never'], default='auto')
+ parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR')
- subparsers = parser.add_subparsers(dest="subparser_name")
+ subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
if not context.fixed_setup:
- parser_create_workspace = subparsers.add_parser('create-workspace', help='Set up a workspace')
- parser_create_workspace.add_argument('directory', nargs='?', help='Directory for the workspace')
- parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace, do not alter configuration')
+ parser_create_workspace = subparsers.add_parser('create-workspace',
+ help='Set up a workspace',
+ description='Sets up a new workspace. NOTE: other devtool subcommands will create a workspace automatically as needed, so you only need to use %(prog)s if you want to specify where the workspace should be located.')
+ parser_create_workspace.add_argument('layerpath', nargs='?', help='Path in which the workspace layer should be created')
+ parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace layer, do not alter configuration')
parser_create_workspace.set_defaults(func=create_workspace)
scriptutils.load_plugins(logger, plugins, os.path.join(scripts_path, 'lib', 'devtool'))
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 69bb228..ae64840 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -499,6 +499,7 @@ def build(args, config, basepath, workspace):
def register_commands(subparsers, context):
parser_add = subparsers.add_parser('add', help='Add a new recipe',
+ description='Adds a new recipe',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser_add.add_argument('recipename', help='Name for new recipe to add')
parser_add.add_argument('srctree', help='Path to external source tree')
@@ -506,15 +507,17 @@ def register_commands(subparsers, context):
parser_add.set_defaults(func=add)
parser_add = 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('--branch', '-b', default="devtool", help='Name for development branch to checkout')
+ 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',
+ 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')
@@ -523,22 +526,26 @@ def register_commands(subparsers, context):
parser_add.set_defaults(func=extract)
parser_add = 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)',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser_add.add_argument('recipename', help='Name of recipe to update')
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_status = subparsers.add_parser('status', help='Show status',
+ 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',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser_status.set_defaults(func=status)
- parser_build = subparsers.add_parser('build', help='Build recipe',
+ parser_build = subparsers.add_parser('build', help='Build a recipe',
+ description='Builds the specified recipe using bitbake (up to do_install)',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser_build.add_argument('recipename', help='Recipe to build')
parser_build.set_defaults(func=build)
parser_reset = subparsers.add_parser('reset', help='Remove a recipe from your workspace',
+ description='Removes the specified recipe from your workspace (resetting its state)',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser_reset.add_argument('recipename', help='Recipe to reset')
parser_reset.set_defaults(func=reset)
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] recipetool: improve command-line help
2015-02-05 14:03 [PATCH 0/2] devtool/recipetool command-line help fixes Paul Eggleton
2015-02-05 14:03 ` [PATCH 1/2] devtool: improve command-line help Paul Eggleton
@ 2015-02-05 14:04 ` Paul Eggleton
1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2015-02-05 14:04 UTC (permalink / raw)
To: openembedded-core
Based on feedback from Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/lib/recipetool/create.py | 8 +++++---
scripts/recipetool | 6 +++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 38f5ead..290fc13 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -406,10 +406,12 @@ def convert_debian(debpath):
def register_command(subparsers):
- parser_create = subparsers.add_parser('create', help='Create a new recipe')
+ parser_create = subparsers.add_parser('create',
+ help='Create a new recipe',
+ description='Creates a new recipe from a source tree')
parser_create.add_argument('source', help='Path or URL to source')
- parser_create.add_argument('-o', '--outfile', help='Full path and filename to recipe to add', required=True)
+ parser_create.add_argument('-o', '--outfile', help='Specify filename for recipe to create', required=True)
parser_create.add_argument('-m', '--machine', help='Make recipe machine-specific as opposed to architecture-specific', action='store_true')
- parser_create.add_argument('-x', '--externalsrc', help='Assuming source is a URL, fetch it and extract it to the specified directory')
+ parser_create.add_argument('-x', '--extract-to', metavar='EXTRACTPATH', help='Assuming source is a URL, fetch it and extract it to the directory specified as %(metavar)s')
parser_create.set_defaults(func=create_recipe)
diff --git a/scripts/recipetool b/scripts/recipetool
index 70e6b6c..2cfa763 100755
--- a/scripts/recipetool
+++ b/scripts/recipetool
@@ -49,11 +49,11 @@ def main():
sys.exit(1)
parser = argparse.ArgumentParser(description="OpenEmbedded recipe tool",
- epilog="Use %(prog)s <command> --help to get help on a specific command")
+ epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
- parser.add_argument('--color', help='Colorize output', choices=['auto', 'always', 'never'], default='auto')
- subparsers = parser.add_subparsers()
+ parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR')
+ subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>')
scriptutils.load_plugins(logger, plugins, os.path.join(scripts_path, 'lib', 'recipetool'))
registered = False
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-05 14:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-05 14:03 [PATCH 0/2] devtool/recipetool command-line help fixes Paul Eggleton
2015-02-05 14:03 ` [PATCH 1/2] devtool: improve command-line help Paul Eggleton
2015-02-05 14:04 ` [PATCH 2/2] recipetool: " Paul Eggleton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox