summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2013-10-17 23:45:37 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-18 15:58:16 +0100
commite22efb497a425845362f29a987b377067cf6034e (patch)
tree69796ac716362ec4c17420e8f8651df2701109b9
parent99d33f27781a7780ae3ec55ece7e6160c33f1ece (diff)
downloadpoky-e22efb497a425845362f29a987b377067cf6034e.tar.gz
wic: Check for the existence/correctness of build artifacts
If a user uses the -e option and specifies a machine that hasn't been built or uses the wrong .wks script for the build artifacts pointed to by the current machine, we should point that out for obvious cases. (From OE-Core rev: a5b9ccadc0603c70c65f74fa386995c585a951db) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/wic20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/wic b/scripts/wic
index a7221c3610..08473d3df4 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -143,6 +143,26 @@ def wic_create_subcommand(args, usage_str):
143 if not os.path.isdir(native_sysroot): 143 if not os.path.isdir(native_sysroot):
144 print "--native-sysroot (-n) not found, exiting\n" 144 print "--native-sysroot (-n) not found, exiting\n"
145 sys.exit(1) 145 sys.exit(1)
146 else:
147 not_found = not_found_dir = ""
148 if not os.path.isdir(rootfs_dir):
149 (not_found, not_found_dir) = ("rootfs-dir", rootfs_dir)
150 elif not os.path.isdir(hdddir) and not os.path.isdir(staging_data_dir):
151 (not_found, not_found_dir) = ("bootimg-dir", bootimg_dir)
152 elif not os.path.isdir(kernel_dir):
153 (not_found, not_found_dir) = ("kernel-dir", kernel_dir)
154 elif not os.path.isdir(native_sysroot):
155 (not_found, not_found_dir) = ("native-sysroot", native_sysroot)
156 if not_found:
157 if not not_found_dir:
158 not_found_dir = "Completely missing artifact - wrong image (.wks) used?"
159 print "Build artifacts not found, exiting."
160 print " (Please check that the build artifacts for the machine"
161 print " selected in local.conf actually exist and that they"
162 print " are the correct artifacts for the image (.wks file)).\n"
163 print "The artifact that couldn't be found was %s:\n %s" % \
164 (not_found, not_found_dir)
165 sys.exit(1)
146 166
147 wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, 167 wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
148 native_sysroot, hdddir, staging_data_dir, scripts_path, 168 native_sysroot, hdddir, staging_data_dir, scripts_path,