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.
Signed-off-by: Ed Bartosh <[email protected]> --- scripts/lib/wic/utils/oe/misc.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py index 41e435f..040176d 100644 --- a/scripts/lib/wic/utils/oe/misc.py +++ b/scripts/lib/wic/utils/oe/misc.py @@ -131,6 +131,9 @@ class BitbakeVars(defaultdict): def __init__(self): defaultdict.__init__(self, dict) + # default_image attribute should be set from outside + self.default_image = None + def _parse_line(self, line, image): """ Parse one line from bitbake -e output. @@ -152,6 +155,9 @@ class BitbakeVars(defaultdict): Get bitbake variable value lazy way, i.e. run 'bitbake -e' only when variable is requested. """ + if not image: + image = self.default_image + if image not in self: # Get bitbake -e output cmd = "bitbake -e" -- 2.1.4 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
