summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/data_smart.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 246c446e4a..e2c93597e5 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -92,10 +92,11 @@ def infer_caller_details(loginfo, parent = False, varval = True):
92 loginfo['func'] = func 92 loginfo['func'] = func
93 93
94class VariableParse: 94class VariableParse:
95 def __init__(self, varname, d, val = None): 95 def __init__(self, varname, d, unexpanded_value = None, val = None):
96 self.varname = varname 96 self.varname = varname
97 self.d = d 97 self.d = d
98 self.value = val 98 self.value = val
99 self.unexpanded_value = unexpanded_value
99 100
100 self.references = set() 101 self.references = set()
101 self.execs = set() 102 self.execs = set()
@@ -447,9 +448,9 @@ class DataSmart(MutableMapping):
447 def expandWithRefs(self, s, varname): 448 def expandWithRefs(self, s, varname):
448 449
449 if not isinstance(s, str): # sanity check 450 if not isinstance(s, str): # sanity check
450 return VariableParse(varname, self, s) 451 return VariableParse(varname, self, s, s)
451 452
452 varparse = VariableParse(varname, self) 453 varparse = VariableParse(varname, self, s)
453 454
454 while s.find('${') != -1: 455 while s.find('${') != -1:
455 olds = s 456 olds = s
@@ -775,6 +776,9 @@ class DataSmart(MutableMapping):
775 return None 776 return None
776 cachename = var + "[" + flag + "]" 777 cachename = var + "[" + flag + "]"
777 778
779 if not expand and retparser and cachename in self.expand_cache:
780 return self.expand_cache[cachename].unexpanded_value, self.expand_cache[cachename]
781
778 if expand and cachename in self.expand_cache: 782 if expand and cachename in self.expand_cache:
779 return self.expand_cache[cachename].value 783 return self.expand_cache[cachename].value
780 784