diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-09-22 17:21:36 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-23 09:53:19 +0100 |
commit | 8f67bb79901698991b41aac8e2f5fe00c03563bd (patch) | |
tree | 39f2da836c57656f807ae1d705e4700aed58d6e8 /scripts/lib | |
parent | afb9340fc69f1e15de3e0d267a0984f995268298 (diff) | |
download | poky-8f67bb79901698991b41aac8e2f5fe00c03563bd.tar.gz |
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>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/devtool/build-image.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/lib/devtool/build-image.py b/scripts/lib/devtool/build-image.py index fa6f0d738a..5759bece04 100644 --- a/scripts/lib/devtool/build-image.py +++ b/scripts/lib/devtool/build-image.py | |||
@@ -25,10 +25,9 @@ from devtool import exec_build_env_command, setup_tinfoil, parse_recipe | |||
25 | 25 | ||
26 | logger = logging.getLogger('devtool') | 26 | logger = logging.getLogger('devtool') |
27 | 27 | ||
28 | def _get_packages(workspace, config): | 28 | def _get_packages(tinfoil, workspace, config): |
29 | """Get list of packages from recipes in the workspace.""" | 29 | """Get list of packages from recipes in the workspace.""" |
30 | result = [] | 30 | result = [] |
31 | tinfoil = setup_tinfoil() | ||
32 | for recipe in workspace: | 31 | for recipe in workspace: |
33 | data = parse_recipe(config, tinfoil, recipe, True) | 32 | data = parse_recipe(config, tinfoil, recipe, True) |
34 | if 'class-target' in data.getVar('OVERRIDES', True).split(':'): | 33 | if 'class-target' in data.getVar('OVERRIDES', True).split(':'): |
@@ -37,7 +36,6 @@ def _get_packages(workspace, config): | |||
37 | else: | 36 | else: |
38 | logger.warning("Skipping recipe %s as it doesn't produce a " | 37 | logger.warning("Skipping recipe %s as it doesn't produce a " |
39 | "package with the same name", recipe) | 38 | "package with the same name", recipe) |
40 | tinfoil.shutdown() | ||
41 | return result | 39 | return result |
42 | 40 | ||
43 | def build_image(args, config, basepath, workspace): | 41 | def build_image(args, config, basepath, workspace): |
@@ -51,8 +49,9 @@ def build_image(args, config, basepath, workspace): | |||
51 | if os.path.isfile(appendfile): | 49 | if os.path.isfile(appendfile): |
52 | os.unlink(appendfile) | 50 | os.unlink(appendfile) |
53 | 51 | ||
52 | tinfoil = setup_tinfoil() | ||
54 | if workspace: | 53 | if workspace: |
55 | packages = _get_packages(workspace, config) | 54 | packages = _get_packages(tinfoil, workspace, config) |
56 | if packages: | 55 | if packages: |
57 | with open(appendfile, 'w') as afile: | 56 | with open(appendfile, 'w') as afile: |
58 | # include packages from workspace recipes into the image | 57 | # include packages from workspace recipes into the image |
@@ -75,6 +74,10 @@ def build_image(args, config, basepath, workspace): | |||
75 | else: | 74 | else: |
76 | logger.warning('No recipes in workspace, building image %s unmodified', image) | 75 | logger.warning('No recipes in workspace, building image %s unmodified', image) |
77 | 76 | ||
77 | deploy_dir_image = tinfoil.config_data.getVar('DEPLOY_DIR_IMAGE', True) | ||
78 | |||
79 | tinfoil.shutdown() | ||
80 | |||
78 | # run bitbake to build image | 81 | # run bitbake to build image |
79 | try: | 82 | try: |
80 | exec_build_env_command(config.init_path, basepath, | 83 | exec_build_env_command(config.init_path, basepath, |
@@ -82,7 +85,8 @@ def build_image(args, config, basepath, workspace): | |||
82 | except ExecutionError as err: | 85 | except ExecutionError as err: |
83 | return err.exitcode | 86 | return err.exitcode |
84 | 87 | ||
85 | logger.info('Successfully built %s', image) | 88 | logger.info('Successfully built %s. You can find output files in %s' |
89 | % (image, deploy_dir_image)) | ||
86 | 90 | ||
87 | def register_commands(subparsers, context): | 91 | def register_commands(subparsers, context): |
88 | """Register devtool subcommands from the build-image plugin""" | 92 | """Register devtool subcommands from the build-image plugin""" |