summaryrefslogtreecommitdiffstats
path: root/scripts
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-12-12 16:59:57 +0000
commit9ee975be7bc886361727dc3cd5a1ccca4c9efb02 (patch)
tree7c1be2d79864785e4ec7d066b62763a55038a807 /scripts
parentcb916ff4e55da077fe66392905a88c2cf1dfe9dc (diff)
downloadpoky-9ee975be7bc886361727dc3cd5a1ccca4c9efb02.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 master rev: a5b9ccadc0603c70c65f74fa386995c585a951db) (From OE-Core rev: 54e0b423852580c62b43c5ead00f431b971bea1a) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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,