diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-01-26 15:53:55 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-26 18:04:35 +0000 |
commit | b3a44951a74fe58714b72e71a7a558b67a71e1e3 (patch) | |
tree | 44f04d625fa4d53a065c82743afe5bc77b380c6f /scripts | |
parent | 5089b93f5b341dc28c343f7afe15efda2081ed36 (diff) | |
download | openembedded-core-b3a44951a74fe58714b72e71a7a558b67a71e1e3.tar.gz openembedded-core-b3a44951a74fe58714b72e71a7a558b67a71e1e3.tar.bz2 openembedded-core-b3a44951a74fe58714b72e71a7a558b67a71e1e3.zip |
devtool: build-image: allow specifying packages to add to image
Provide an option to devtool build-image to specify the list of packages
instead of taking the list of packages produced by recipes in the
workspace. Sometimes you don't want all of these packages; other times
you want to add more.
This is the most immediate fix for [YOCTO #8855], though it is a little
crude so I would like to provide better means of customising the image
contents later.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/devtool/build-image.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/lib/devtool/build-image.py b/scripts/lib/devtool/build-image.py index e53239dd28..48c3a1198a 100644 --- a/scripts/lib/devtool/build-image.py +++ b/scripts/lib/devtool/build-image.py @@ -71,8 +71,11 @@ def build_image(args, config, basepath, workspace): raise DevtoolError('Specified recipe %s is not an image recipe' % image) try: - if workspace: - packages = _get_packages(tinfoil, workspace, config) + if workspace or args.add_packages: + if args.add_packages: + packages = args.add_packages.split(',') + else: + packages = _get_packages(tinfoil, workspace, config) if packages: with open(appendfile, 'w') as afile: # include packages from workspace recipes into the image @@ -108,4 +111,8 @@ def register_commands(subparsers, context): description='Builds an image, extending it to include ' 'packages from recipes in the workspace') parser.add_argument('imagename', help='Image recipe to build', nargs='?') + parser.add_argument('-p', '--add-packages', help='Instead of adding packages for the ' + 'entire workspace, specify packages to be added to the image ' + '(separate multiple packages by commas)', + metavar='PACKAGES') parser.set_defaults(func=build_image) |