mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 09:49:33 +02:00
devtool: build-image: tell user where to find output files
If the user is running "devtool build-image" within the extensible SDK then they probably won't know where to find the resulting output files, so we should tell them explicitly. (From OE-Core rev: 9baf9fd7a53142a98c7f1cd49c7b001760af51f9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
afb9340fc6
commit
8f67bb7990
@@ -25,10 +25,9 @@ from devtool import exec_build_env_command, setup_tinfoil, parse_recipe
|
|||||||
|
|
||||||
logger = logging.getLogger('devtool')
|
logger = logging.getLogger('devtool')
|
||||||
|
|
||||||
def _get_packages(workspace, config):
|
def _get_packages(tinfoil, workspace, config):
|
||||||
"""Get list of packages from recipes in the workspace."""
|
"""Get list of packages from recipes in the workspace."""
|
||||||
result = []
|
result = []
|
||||||
tinfoil = setup_tinfoil()
|
|
||||||
for recipe in workspace:
|
for recipe in workspace:
|
||||||
data = parse_recipe(config, tinfoil, recipe, True)
|
data = parse_recipe(config, tinfoil, recipe, True)
|
||||||
if 'class-target' in data.getVar('OVERRIDES', True).split(':'):
|
if 'class-target' in data.getVar('OVERRIDES', True).split(':'):
|
||||||
@@ -37,7 +36,6 @@ def _get_packages(workspace, config):
|
|||||||
else:
|
else:
|
||||||
logger.warning("Skipping recipe %s as it doesn't produce a "
|
logger.warning("Skipping recipe %s as it doesn't produce a "
|
||||||
"package with the same name", recipe)
|
"package with the same name", recipe)
|
||||||
tinfoil.shutdown()
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def build_image(args, config, basepath, workspace):
|
def build_image(args, config, basepath, workspace):
|
||||||
@@ -51,8 +49,9 @@ def build_image(args, config, basepath, workspace):
|
|||||||
if os.path.isfile(appendfile):
|
if os.path.isfile(appendfile):
|
||||||
os.unlink(appendfile)
|
os.unlink(appendfile)
|
||||||
|
|
||||||
|
tinfoil = setup_tinfoil()
|
||||||
if workspace:
|
if workspace:
|
||||||
packages = _get_packages(workspace, config)
|
packages = _get_packages(tinfoil, workspace, config)
|
||||||
if packages:
|
if packages:
|
||||||
with open(appendfile, 'w') as afile:
|
with open(appendfile, 'w') as afile:
|
||||||
# include packages from workspace recipes into the image
|
# include packages from workspace recipes into the image
|
||||||
@@ -75,6 +74,10 @@ def build_image(args, config, basepath, workspace):
|
|||||||
else:
|
else:
|
||||||
logger.warning('No recipes in workspace, building image %s unmodified', image)
|
logger.warning('No recipes in workspace, building image %s unmodified', image)
|
||||||
|
|
||||||
|
deploy_dir_image = tinfoil.config_data.getVar('DEPLOY_DIR_IMAGE', True)
|
||||||
|
|
||||||
|
tinfoil.shutdown()
|
||||||
|
|
||||||
# run bitbake to build image
|
# run bitbake to build image
|
||||||
try:
|
try:
|
||||||
exec_build_env_command(config.init_path, basepath,
|
exec_build_env_command(config.init_path, basepath,
|
||||||
@@ -82,7 +85,8 @@ def build_image(args, config, basepath, workspace):
|
|||||||
except ExecutionError as err:
|
except ExecutionError as err:
|
||||||
return err.exitcode
|
return err.exitcode
|
||||||
|
|
||||||
logger.info('Successfully built %s', image)
|
logger.info('Successfully built %s. You can find output files in %s'
|
||||||
|
% (image, deploy_dir_image))
|
||||||
|
|
||||||
def register_commands(subparsers, context):
|
def register_commands(subparsers, context):
|
||||||
"""Register devtool subcommands from the build-image plugin"""
|
"""Register devtool subcommands from the build-image plugin"""
|
||||||
|
|||||||
Reference in New Issue
Block a user