[OE-core] [PATCH 2/3] wic: check passed-in build artifact directories

Tom Zanussi tom.zanussi at linux.intel.com
Wed Oct 16 05:14:30 UTC 2013


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

Signed-off-by: Tom Zanussi <tom.zanussi at linux.intel.com>
---
 scripts/wic | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index aa2791a..425b665 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -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,
-- 
1.7.11.4




More information about the Openembedded-core mailing list