diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-08-30 20:47:02 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-30 21:38:21 +0100 |
commit | 95c6749af872a92849cae6f8bbf38c8ba76443ae (patch) | |
tree | d8929e0d181eae59d611f15cb4d0abd7c52b774d /scripts/lib/wic/utils/oe | |
parent | e1fe3479a603d3dc95d7ac78da4bc58b78a1706c (diff) | |
download | poky-95c6749af872a92849cae6f8bbf38c8ba76443ae.tar.gz |
wic: add default_image attribute to BitbakeVars
New attribute is used when bitbake variable is requested without
specifying image name. The attribute should be set from outside,
for example when wic is called with '-e <image>' option.
(From OE-Core rev: 38d0b3744b5829333148ac4fc97dc45a8d0ba3a5)
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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py index 41e435fc27..040176d486 100644 --- a/scripts/lib/wic/utils/oe/misc.py +++ b/scripts/lib/wic/utils/oe/misc.py | |||
@@ -131,6 +131,9 @@ class BitbakeVars(defaultdict): | |||
131 | def __init__(self): | 131 | def __init__(self): |
132 | defaultdict.__init__(self, dict) | 132 | defaultdict.__init__(self, dict) |
133 | 133 | ||
134 | # default_image attribute should be set from outside | ||
135 | self.default_image = None | ||
136 | |||
134 | def _parse_line(self, line, image): | 137 | def _parse_line(self, line, image): |
135 | """ | 138 | """ |
136 | Parse one line from bitbake -e output. | 139 | Parse one line from bitbake -e output. |
@@ -152,6 +155,9 @@ class BitbakeVars(defaultdict): | |||
152 | Get bitbake variable value lazy way, i.e. run | 155 | Get bitbake variable value lazy way, i.e. run |
153 | 'bitbake -e' only when variable is requested. | 156 | 'bitbake -e' only when variable is requested. |
154 | """ | 157 | """ |
158 | if not image: | ||
159 | image = self.default_image | ||
160 | |||
155 | if image not in self: | 161 | if image not in self: |
156 | # Get bitbake -e output | 162 | # Get bitbake -e output |
157 | cmd = "bitbake -e" | 163 | cmd = "bitbake -e" |