All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 14/18] devtool: build: enable showing default task in help
Date: Mon, 23 Nov 2015 15:09:33 +1300	[thread overview]
Message-ID: <d4cfb41397e2dba8da65bca025b05031bb9e9a32.1448244474.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1448244474.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1448244474.git.paul.eggleton@linux.intel.com>

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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/devtool              | 1 +
 scripts/lib/devtool/build.py | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/devtool b/scripts/devtool
index 2a5a3d4..1fcb42c 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 14f55e0..0b8e88b 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')
-- 
2.1.0



  parent reply	other threads:[~2015-11-23  2:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23  2:09 [PATCH 00/18] devtool / recipetool fixes Paul Eggleton
2015-11-23  2:09 ` [PATCH 01/18] devtool: upgrade: fix removing other recipes from workspace on reset Paul Eggleton
2015-11-23  2:09 ` [PATCH 02/18] devtool: upgrade: fix updating PV and SRCREV Paul Eggleton
2015-11-23  2:09 ` [PATCH 03/18] devtool: upgrade: remove erroneous error when not renaming recipe Paul Eggleton
2015-11-23  2:09 ` [PATCH 04/18] devtool: upgrade: fetch remote repository before checking out new revision Paul Eggleton
2015-11-23  2:09 ` [PATCH 05/18] devtool: upgrade: provide a means to update the source branch Paul Eggleton
2015-11-23  2:09 ` [PATCH 06/18] lib/oe/patch: improve extraction of patch header Paul Eggleton
2015-11-23  2:09 ` [PATCH 07/18] devtool: disable creating workspace for extract and search subcommands Paul Eggleton
2015-11-23  2:09 ` [PATCH 08/18] devtool: package: use DEPLOY_DIR_<pkgtype> to get deploy directory Paul Eggleton
2015-11-23  2:09 ` [PATCH 09/18] devtool: drop unused plugin_init() functions Paul Eggleton
2015-11-23  2:09 ` [PATCH 10/18] devtool: search: print SUMMARY value Paul Eggleton
2015-11-23  2:09 ` [PATCH 11/18] devtool: ensure we change back to the original dir on error Paul Eggleton
2015-11-23  2:09 ` [PATCH 12/18] lib/oe/recipeutils: check in validate_pn() for names instead of filenames Paul Eggleton
2015-11-23  2:09 ` [PATCH 13/18] devtool: build: use bbappend to set PARALLEL_MAKE Paul Eggleton
2015-11-23  2:09 ` Paul Eggleton [this message]
2015-11-23  2:09 ` [PATCH 15/18] devtool: clarify help text Paul Eggleton
2015-11-23  2:09 ` [PATCH 16/18] lib/oe/recipeutils: refactor patch_recipe_file() to use edit_metadata() Paul Eggleton
2015-11-23  2:09 ` [PATCH 17/18] recipetool: add setvar subcommand Paul Eggleton
2015-11-23  2:09 ` [PATCH 18/18] recipetool: make plugin registration function name consistent with devtool Paul Eggleton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4cfb41397e2dba8da65bca025b05031bb9e9a32.1448244474.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.