summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-11-23 08:50:29 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-01 21:32:04 +0000
commit5001f23ecc5f380938cee8d7fcce053ea482d928 (patch)
treed1cabd8f38c55ad69c64b383cc53a7cc054da3fc
parentf79022dfff7374634cc8153aea61e6bf9c72b377 (diff)
downloadpoky-contrib-5001f23ecc5f380938cee8d7fcce053ea482d928.tar.gz
poky-contrib-5001f23ecc5f380938cee8d7fcce053ea482d928.tar.bz2
poky-contrib-5001f23ecc5f380938cee8d7fcce053ea482d928.zip
devtool: build: enable showing default task in help
Enable access to the configuration object in register_commands() so that we can read configuration values there; this allows us to show the task that will be run in the command line help for the build subcommand. (From OE-Core rev: 142d006de3235a034839ef7bbe147c56fc7af04a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/devtool1
-rw-r--r--scripts/lib/devtool/build.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/devtool b/scripts/devtool
index 2a5a3d41c17..1fcb42c1344 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -220,6 +220,7 @@ def main():
config = ConfigHandler(os.path.join(basepath, 'conf', 'devtool.conf'))
if not config.read():
return -1
+ context.config = config
bitbake_subdir = config.get('General', 'bitbake_subdir', '')
if bitbake_subdir:
diff --git a/scripts/lib/devtool/build.py b/scripts/lib/devtool/build.py
index 14f55e0f846..0b8e88b8177 100644
--- a/scripts/lib/devtool/build.py
+++ b/scripts/lib/devtool/build.py
@@ -46,12 +46,14 @@ def _set_file_values(fn, values):
f.writelines(newlines)
return updated
+def _get_build_task(config):
+ return config.get('Build', 'build_task', 'populate_sysroot')
def build(args, config, basepath, workspace):
"""Entry point for the devtool 'build' subcommand"""
check_workspace_recipe(workspace, args.recipename)
- build_task = config.get('Build', 'build_task', 'populate_sysroot')
+ build_task = _get_build_task(config)
bbappend = workspace[args.recipename]['bbappend']
if args.disable_parallel_make:
@@ -71,7 +73,7 @@ def build(args, config, basepath, workspace):
def register_commands(subparsers, context):
"""Register devtool subcommands from this plugin"""
parser_build = subparsers.add_parser('build', help='Build a recipe',
- description='Builds the specified recipe using bitbake',
+ description='Builds the specified recipe using bitbake (up to and including do_%s)' % _get_build_task(context.config),
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser_build.add_argument('recipename', help='Recipe to build')
parser_build.add_argument('-s', '--disable-parallel-make', action="store_true", help='Disable make parallelism')