wic: check passed-in build artifact directories

Make sure they exist - complain if they don't.

(From OE-Core master rev: 24a585e3fd0ea0166991a6aa834bba15bcd8295d)

(From OE-Core rev: 4565512015d257e492d7fbb9e28c6086111d892d)

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>
This commit is contained in:
Tom Zanussi 2013-10-16 00:14:30 -05:00 committed by Richard Purdie
parent aeae568600
commit dad9e78f09
1 changed files with 12 additions and 0 deletions

View File

@ -119,6 +119,18 @@ def wic_create_subcommand(args, usage_str):
bootimg_dir = options.bootimg_dir
kernel_dir = options.kernel_dir
native_sysroot = options.native_sysroot
if not os.path.isdir(rootfs_dir):
print "--roofs-dir (-r) not found, exiting\n"
sys.exit(1)
if not os.path.isdir(bootimg_dir):
print "--bootimg-dir (-b) not found, exiting\n"
sys.exit(1)
if not os.path.isdir(kernel_dir):
print "--kernel-dir (-k) not found, exiting\n"
sys.exit(1)
if not os.path.isdir(native_sysroot):
print "--native-sysroot (-n) not found, exiting\n"
sys.exit(1)
wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
native_sysroot, hdddir, staging_data_dir, scripts_path,