summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-26 15:53:55 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-26 18:05:13 +0000
commite559b66289ed802629ef0a11964748c9acf37ccf (patch)
tree7a7334c4958950fabf29cd16473d49d8fffb6fa8 /scripts
parente00eac862eb429f171b3263a624721bdf3a6171b (diff)
downloadpoky-e559b66289ed802629ef0a11964748c9acf37ccf.tar.gz
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. (From OE-Core rev: b3a44951a74fe58714b72e71a7a558b67a71e1e3) 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.py11
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):
71 raise DevtoolError('Specified recipe %s is not an image recipe' % image) 71 raise DevtoolError('Specified recipe %s is not an image recipe' % image)
72 72
73 try: 73 try:
74 if workspace: 74 if workspace or args.add_packages:
75 packages = _get_packages(tinfoil, workspace, config) 75 if args.add_packages:
76 packages = args.add_packages.split(',')
77 else:
78 packages = _get_packages(tinfoil, workspace, config)
76 if packages: 79 if packages:
77 with open(appendfile, 'w') as afile: 80 with open(appendfile, 'w') as afile:
78 # include packages from workspace recipes into the image 81 # include packages from workspace recipes into the image
@@ -108,4 +111,8 @@ def register_commands(subparsers, context):
108 description='Builds an image, extending it to include ' 111 description='Builds an image, extending it to include '
109 'packages from recipes in the workspace') 112 'packages from recipes in the workspace')
110 parser.add_argument('imagename', help='Image recipe to build', nargs='?') 113 parser.add_argument('imagename', help='Image recipe to build', nargs='?')
114 parser.add_argument('-p', '--add-packages', help='Instead of adding packages for the '
115 'entire workspace, specify packages to be added to the image '
116 '(separate multiple packages by commas)',
117 metavar='PACKAGES')
111 parser.set_defaults(func=build_image) 118 parser.set_defaults(func=build_image)