summaryrefslogtreecommitdiffstats
path: root/scripts/wic
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-29 13:30:36 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-02 23:08:38 +0100
commit335aa0fee865c23a067562323641bef1dcae687e (patch)
tree2ebabf1ccf6a083f998d7f17a140d15eea7af1c7 /scripts/wic
parentd88af4f518307ec615520d66c96aa70546169f4b (diff)
downloadpoky-335aa0fee865c23a067562323641bef1dcae687e.tar.gz
wic: Fix confusing error message
Wic throws this message when any of the build artifacts are not provided: Build artifacts not completely specified, exiting. (Use 'wic -e' or 'wic -r -b -k -n' to specify artifacts) It was not clear which artifact was not specified. Reworked the code to specify list of missed artifacts. Now the message looks like this: The following build artifacts are not specified: bootimg-dir, kernel-dir, native-sysroot [YOCTO #7912] (From OE-Core rev: 98912687f15f6d7537746fb38499f739e1a47be9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/wic')
-rwxr-xr-xscripts/wic19
1 files changed, 12 insertions, 7 deletions
diff --git a/scripts/wic b/scripts/wic
index b75d122482..ac272c62f7 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -122,13 +122,18 @@ def wic_create_subcommand(args, usage_str):
122 logging.error("Can't build roofs as bitbake is not in the $PATH") 122 logging.error("Can't build roofs as bitbake is not in the $PATH")
123 sys.exit(1) 123 sys.exit(1)
124 124
125 if not options.image_name and not (options.rootfs_dir and 125 if not options.image_name:
126 options.bootimg_dir and 126 missed = []
127 options.kernel_dir and 127 for val, opt in [(options.rootfs_dir, 'rootfs-dir'),
128 options.native_sysroot): 128 (options.bootimg_dir, 'bootimg-dir'),
129 print "Build artifacts not completely specified, exiting." 129 (options.kernel_dir, 'kernel-dir'),
130 print " (Use 'wic -e' or 'wic -r -b -k -n' to specify artifacts)" 130 (options.native_sysroot, 'native-sysroot')]:
131 sys.exit(1) 131 if not val:
132 missed.append(opt)
133 if missed:
134 print "The following build artifacts are not specified:"
135 print " " + ", ".join(missed)
136 sys.exit(1)
132 137
133 if not options.image_name: 138 if not options.image_name:
134 options.build_check = False 139 options.build_check = False