Skip to contentSkip to conversation

wic: env-command bugfix

PATCH New Tom Zanussi 1 participant 2 messages Mar 28, 2014

lore
Share & tools
lore
#0 lore raw

cover wic: env-command bugfix

While testing some new wic functionality, I noticed a bug I introduced when adding the plugin support, which this fixes.

The following changes since commit 8c3eb5ee4582b6f6d489549290937657f37fc19e:

packagegroup-toolset-native: Update after ocf-linux -> cryptodev-linux change (2014-03-27 19:53:30 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib.git tzanussi/wic-bitbake-env-fix
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-bitbake-env-fix

Tom Zanussi (1):
wic: Fix bitbake_env_command for 'None' case

 scripts/lib/image/engine.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 wic: Fix bitbake_env_command for 'None' case

bitbake_env_command will choke if it isn't given an image, make sure it does the right thing in that case.

---
 scripts/lib/image/engine.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/lib/image/engine.py +4 -1
index 6cf6169..0643780 100644
@@ -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
Signature · 1 line
1.8.3.1