Patchwork [1/3] wic: check for build artifacts

login
register
mail settings
Submitter tom.zanussi@linux.intel.com
Date Oct. 16, 2013, 5:14 a.m.
Message ID <7df25a781aad32cb4f7deaa1c4af839e8dc604a2.1381898855.git.tom.zanussi@linux.intel.com>
Download mbox | patch
Permalink /patch/59981/
State Accepted
Commit 040bd3d6d33f84109ecf5998c02ae8ba3dbe76af
Headers show

Comments

tom.zanussi@linux.intel.com - Oct. 16, 2013, 5:14 a.m.
wic needs to be given one form of build artifacts or another -
complain if the user doesn't do that.

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

Patch

diff --git a/scripts/wic b/scripts/wic
index 06e72bb..aa2791a 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -75,6 +75,14 @@  def wic_create_subcommand(args, usage_str):
         parser.print_help()
         sys.exit(1)
 
+    if not options.image_name and not (options.rootfs_dir and
+                                       options.bootimg_dir and
+                                       options.kernel_dir and
+                                       options.native_sysroot):
+        print "Build artifacts not completely specified, exiting."
+        print "  (Use 'wic -e' or 'wic -r -b -k -n' to specify artifacts)"
+        sys.exit(1)
+
     if not options.image_name:
         options.build_check = False