summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)