summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-07 10:20:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-07 10:29:58 +0100
commita671ced0ea7c5775d2f2699d3a720c6d0c11f743 (patch)
treea6769d43d0a92bb3d82c454ae83d90202b9f8093 /bitbake/lib/bb/data_smart.py
parent9392fa8a7bf3a0b012a7759c1b629f2ee46a71a8 (diff)
downloadpoky-a671ced0ea7c5775d2f2699d3a720c6d0c11f743.tar.gz
bitbake: data_smart: Ensure all possible overrides are cached including those with '_' in the name
Unfortunately we've been neglecting to pay the correct tributes to the cookie monster and hence the datastore is malfunctioning. Currently tributes are only paid on the last part of a variable after the last "_" character. We need to split by *all* "_" characters since an override may contain the character. This fixes the code so the correct number of tributes are made. Paradoxically parsing appears to be faster after this change. (Bitbake rev: d1c712fd3a59fa804e6fd451612c30487671f3a2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r--bitbake/lib/bb/data_smart.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index e4bdb2fdd9..46a0221e10 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -513,10 +513,15 @@ class DataSmart(MutableMapping):
513 def _setvar_update_overrides(self, var): 513 def _setvar_update_overrides(self, var):
514 # aka pay the cookie monster 514 # aka pay the cookie monster
515 override = var[var.rfind('_')+1:] 515 override = var[var.rfind('_')+1:]
516 if len(override) > 0: 516 shortvar = var[:var.rfind('_')]
517 while override:
517 if override not in self._seen_overrides: 518 if override not in self._seen_overrides:
518 self._seen_overrides[override] = set() 519 self._seen_overrides[override] = set()
519 self._seen_overrides[override].add( var ) 520 self._seen_overrides[override].add( var )
521 override = None
522 if "_" in shortvar:
523 override = var[shortvar.rfind('_')+1:]
524 shortvar = var[:shortvar.rfind('_')]
520 525
521 def getVar(self, var, expand=False, noweakdefault=False): 526 def getVar(self, var, expand=False, noweakdefault=False):
522 return self.getVarFlag(var, "_content", expand, noweakdefault) 527 return self.getVarFlag(var, "_content", expand, noweakdefault)