diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-07-10 14:08:26 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-10 13:34:50 +0100 |
commit | 18cc6d2ec4dc289bb0333dddc96df5a645ea53d0 (patch) | |
tree | 683b97a147f21808a55b3b835e784bc97ec98035 /scripts/lib/wic/utils/oe/misc.py | |
parent | 631632addbc81b06b7accfca8f8a9871d6b09111 (diff) | |
download | openembedded-core-18cc6d2ec4dc289bb0333dddc96df5a645ea53d0.tar.gz openembedded-core-18cc6d2ec4dc289bb0333dddc96df5a645ea53d0.tar.bz2 openembedded-core-18cc6d2ec4dc289bb0333dddc96df5a645ea53d0.zip |
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/utils/oe/misc.py')
-rw-r--r-- | scripts/lib/wic/utils/oe/misc.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py index 2f9f515cf8..49787456b2 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): |