Patchwork [1/1] wic: Fix bitbake_env_command for 'None' case

login
register
mail settings
Submitter tom.zanussi@linux.intel.com
Date March 28, 2014, 9:49 p.m.
Message ID <222d52976466464a3ff184e07c0c884c8f821dbc.1396043171.git.tom.zanussi@linux.intel.com>
Download mbox | patch
Permalink /patch/69605/
State New
Headers show

Comments

tom.zanussi@linux.intel.com - March 28, 2014, 9:49 p.m.
bitbake_env_command will choke if it isn't given an image, make sure
it does the right thing in that case.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/lib/image/engine.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 6cf6169..0643780 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -65,7 +65,10 @@  def find_bitbake_env_lines(image_name):
     If image_name is empty, plugins might still be able to use the
     environment, so set it regardless.
     """
-    bitbake_env_cmd = "bitbake -e %s" % image_name
+    if image_name:
+        bitbake_env_cmd = "bitbake -e %s" % image_name
+    else:
+        bitbake_env_cmd = "bitbake -e"
     rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd)
     if rc != 0:
         print "Couldn't get '%s' output." % bitbake_env_cmd