mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
devtool: Create a single file for the build devtool feature
The intention is to have a single file for each devtool feature so devtool can grow in a modular way. In this direction, this patch creates build.py, moving all related build features from standard.py to build.py. (From OE-Core rev: 61bb1759f7ecb8b404f7d97573c61aef31f2f109) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8be95c5fbe
commit
1a721815ed
@@ -857,22 +857,6 @@ def reset(args, config, basepath, workspace):
|
||||
return 0
|
||||
|
||||
|
||||
def build(args, config, basepath, workspace):
|
||||
"""Entry point for the devtool 'build' subcommand"""
|
||||
import bb
|
||||
if not args.recipename in workspace:
|
||||
raise DevtoolError("no recipe named %s in your workspace" %
|
||||
args.recipename)
|
||||
build_task = config.get('Build', 'build_task', 'populate_sysroot')
|
||||
try:
|
||||
exec_build_env_command(config.init_path, basepath, 'bitbake -c %s %s' % (build_task, args.recipename), watch=True)
|
||||
except bb.process.ExecutionError as e:
|
||||
# We've already seen the output since watch=True, so just ensure we return something to the user
|
||||
return e.exitcode
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def register_commands(subparsers, context):
|
||||
"""Register devtool subcommands from this plugin"""
|
||||
parser_add = subparsers.add_parser('add', help='Add a new recipe',
|
||||
@@ -921,12 +905,6 @@ def register_commands(subparsers, context):
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
parser_status.set_defaults(func=status)
|
||||
|
||||
parser_build = subparsers.add_parser('build', help='Build a recipe',
|
||||
description='Builds the specified recipe using bitbake',
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user