summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake/lib/bb/data_smart.py')
-rw-r--r--poky/bitbake/lib/bb/data_smart.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/poky/bitbake/lib/bb/data_smart.py b/poky/bitbake/lib/bb/data_smart.py
index dd20ca557e..5415f2fccf 100644
--- a/poky/bitbake/lib/bb/data_smart.py
+++ b/poky/bitbake/lib/bb/data_smart.py
@@ -29,7 +29,7 @@ logger = logging.getLogger("BitBake.Data")
__setvar_keyword__ = [":append", ":prepend", ":remove"]
__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z]*))?$')
__expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+?}")
-__expand_python_regexp__ = re.compile(r"\${@.+?}")
+__expand_python_regexp__ = re.compile(r"\${@(?:{.*?}|.)+?}")
__whitespace_split__ = re.compile(r'(\s)')
__override_regexp__ = re.compile(r'[a-z0-9]+')
@@ -119,6 +119,11 @@ class VariableParse:
else:
code = match.group()[3:-1]
+ # Do not run code that contains one or more unexpanded variables
+ # instead return the code with the characters we removed put back
+ if __expand_var_regexp__.findall(code):
+ return "${@" + code + "}"
+
if self.varname:
varname = 'Var <%s>' % self.varname
else:
@@ -476,13 +481,6 @@ class DataSmart(MutableMapping):
def expand(self, s, varname = None):
return self.expandWithRefs(s, varname).value
- def finalize(self, parent = False):
- return
-
- def internal_finalize(self, parent = False):
- """Performs final steps upon the datastore, including application of overrides"""
- self.overrides = None
-
def need_overrides(self):
if self.overrides is not None:
return
@@ -633,7 +631,7 @@ class DataSmart(MutableMapping):
nextnew.update(vardata.references)
nextnew.update(vardata.contains.keys())
new = nextnew
- self.internal_finalize(True)
+ self.overrides = None
def _setvar_update_overrides(self, var, **loginfo):
# aka pay the cookie monster