mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
devtool: build: support using BBCLASSEXTENDed names
It's logical that you would want to build BBCLASSEXTENDed items separately through devtool build, so simply allow that - we're just passing the name verbatim to bitbake, so all it means is adjusting the validation. (From OE-Core rev: 25dc5ac42c9da53c01416e7fdcc819d729281133) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
38ed039753
commit
b2fe2a8fdc
|
@ -146,19 +146,35 @@ def parse_recipe(config, tinfoil, pn, appends):
|
||||||
return oe.recipeutils.parse_recipe(recipefile, append_files,
|
return oe.recipeutils.parse_recipe(recipefile, append_files,
|
||||||
tinfoil.config_data)
|
tinfoil.config_data)
|
||||||
|
|
||||||
def check_workspace_recipe(workspace, pn, checksrc=True):
|
def check_workspace_recipe(workspace, pn, checksrc=True, bbclassextend=False):
|
||||||
"""
|
"""
|
||||||
Check that a recipe is in the workspace and (optionally) that source
|
Check that a recipe is in the workspace and (optionally) that source
|
||||||
is present.
|
is present.
|
||||||
"""
|
"""
|
||||||
if not pn in workspace:
|
|
||||||
|
workspacepn = pn
|
||||||
|
|
||||||
|
for recipe, value in workspace.iteritems():
|
||||||
|
if recipe == pn:
|
||||||
|
break
|
||||||
|
if bbclassextend:
|
||||||
|
recipefile = value['recipefile']
|
||||||
|
if recipefile:
|
||||||
|
targets = get_bbclassextend_targets(recipefile, recipe)
|
||||||
|
if pn in targets:
|
||||||
|
workspacepn = recipe
|
||||||
|
break
|
||||||
|
else:
|
||||||
raise DevtoolError("No recipe named '%s' in your workspace" % pn)
|
raise DevtoolError("No recipe named '%s' in your workspace" % pn)
|
||||||
|
|
||||||
if checksrc:
|
if checksrc:
|
||||||
srctree = workspace[pn]['srctree']
|
srctree = workspace[workspacepn]['srctree']
|
||||||
if not os.path.exists(srctree):
|
if not os.path.exists(srctree):
|
||||||
raise DevtoolError("Source tree %s for recipe %s does not exist" % (srctree, pn))
|
raise DevtoolError("Source tree %s for recipe %s does not exist" % (srctree, workspacepn))
|
||||||
if not os.listdir(srctree):
|
if not os.listdir(srctree):
|
||||||
raise DevtoolError("Source tree %s for recipe %s is empty" % (srctree, pn))
|
raise DevtoolError("Source tree %s for recipe %s is empty" % (srctree, workspacepn))
|
||||||
|
|
||||||
|
return workspacepn
|
||||||
|
|
||||||
def use_external_build(same_dir, no_same_dir, d):
|
def use_external_build(same_dir, no_same_dir, d):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -51,11 +51,11 @@ def _get_build_task(config):
|
||||||
|
|
||||||
def build(args, config, basepath, workspace):
|
def build(args, config, basepath, workspace):
|
||||||
"""Entry point for the devtool 'build' subcommand"""
|
"""Entry point for the devtool 'build' subcommand"""
|
||||||
check_workspace_recipe(workspace, args.recipename)
|
workspacepn = check_workspace_recipe(workspace, args.recipename, bbclassextend=True)
|
||||||
|
|
||||||
build_task = _get_build_task(config)
|
build_task = _get_build_task(config)
|
||||||
|
|
||||||
bbappend = workspace[args.recipename]['bbappend']
|
bbappend = workspace[workspacepn]['bbappend']
|
||||||
if args.disable_parallel_make:
|
if args.disable_parallel_make:
|
||||||
logger.info("Disabling 'make' parallelism")
|
logger.info("Disabling 'make' parallelism")
|
||||||
_set_file_values(bbappend, {'PARALLEL_MAKE': ''})
|
_set_file_values(bbappend, {'PARALLEL_MAKE': ''})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user