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:35:40 +0100 |
commit | 8f8d3362b8631aa6d09f1ef9df5111ba7ce10f85 (patch) | |
tree | 2f15d02c6da315cbf8eb363e740c6d62f4516f39 /scripts/lib/wic/utils/oe | |
parent | b80ddb02294a4c4cf043274d8979b547721f22d3 (diff) | |
download | poky-8f8d3362b8631aa6d09f1ef9df5111ba7ce10f85.tar.gz |
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.
(From OE-Core rev: 18cc6d2ec4dc289bb0333dddc96df5a645ea53d0)
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')
-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): | |||
146 | if key.replace('_', '').isalnum(): | 146 | if key.replace('_', '').isalnum(): |
147 | _BITBAKE_VARS[image][key] = val.strip('"') | 147 | _BITBAKE_VARS[image][key] = val.strip('"') |
148 | 148 | ||
149 | # Make first image a default set of variables | ||
150 | images = [key for key in _BITBAKE_VARS if key] | ||
151 | if len(images) == 1: | ||
152 | _BITBAKE_VARS[None] = _BITBAKE_VARS[image] | ||
153 | |||
149 | return _BITBAKE_VARS[image].get(var) | 154 | return _BITBAKE_VARS[image].get(var) |
150 | 155 | ||
151 | def parse_sourceparams(sourceparams): | 156 | def parse_sourceparams(sourceparams): |