[oe-commits] Ed Bartosh : wic: Set default set of bitbake variables
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 10 14:12:06 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: 18cc6d2ec4dc289bb0333dddc96df5a645ea53d0
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=18cc6d2ec4dc289bb0333dddc96df5a645ea53d0
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date: Fri Jul 10 14:08:26 2015 +0300
wic: Set default set of bitbake variables
Set default set of bitbake variables to the set of variables
for the first parsed image.
This allows wic to find proper bitbake varibale values
if it's called with '-e <image>' even without specifying
image in the call of get_bitbake_var.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/wic/utils/oe/misc.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py
index 2f9f515..4978745 100644
--- a/scripts/lib/wic/utils/oe/misc.py
+++ b/scripts/lib/wic/utils/oe/misc.py
@@ -146,6 +146,11 @@ def get_bitbake_var(var, image=None):
if key.replace('_', '').isalnum():
_BITBAKE_VARS[image][key] = val.strip('"')
+ # Make first image a default set of variables
+ images = [key for key in _BITBAKE_VARS if key]
+ if len(images) == 1:
+ _BITBAKE_VARS[None] = _BITBAKE_VARS[image]
+
return _BITBAKE_VARS[image].get(var)
def parse_sourceparams(sourceparams):
More information about the Openembedded-commits
mailing list