]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: set default image
authorEd Bartosh <ed.bartosh@linux.intel.com>
Sun, 30 Aug 2015 17:47:03 +0000 (20:47 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Aug 2015 20:38:11 +0000 (21:38 +0100)
Set BitbakeVars.default_image when wic is called with -e option.
This makes get_bitbake_var API to use provided image as a default
source of variables.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/wic

index 5aa2393cf968760d5d0f199cd17fe53691ec1987..5818e2da2e35582406bde98c45dc62db22ec03ab 100755 (executable)
@@ -52,7 +52,7 @@ if bitbake_exe:
 else:
     bitbake_main = None
 
-from wic.utils.oe.misc import get_bitbake_var
+from wic.utils.oe.misc import get_bitbake_var, BB_VARS
 from wic.utils.errors import WicError
 from image import engine
 from image import help as hlp
@@ -141,7 +141,9 @@ def wic_create_subcommand(args, usage_str):
             print "  " + ", ".join(missed)
             sys.exit(1)
 
-    if not options.image_name:
+    if options.image_name:
+        BB_VARS.default_image = options.image_name
+    else:
         options.build_check = False
 
     if options.build_check: