summaryrefslogtreecommitdiffstats
path: root/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-17 17:34:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-28 15:27:04 +0100
commitd924ff9ede57c3dea6e1c738ba3633f18d460b14 (patch)
tree275ebec6f76bdc23ecd6e7f7bcc55d0f0e964ef1 /lib/bb/data_smart.py
parent2b5548c591d4cfde9238d2cc0959c42cfc08f09c (diff)
downloadbitbake-contrib-d924ff9ede57c3dea6e1c738ba3633f18d460b14.tar.gz
bitbake/data_smart: Don't track overrides in deleted variable names
When we delete a variable we no longer expect it to override other variables. To do this we remove it from the list of active overrides at deletion time. It turns out we already had to do this at override expansion time so this cleans up the code to be more consistent as an added bonus. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r--lib/bb/data_smart.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index bc359de4f..8f67227bd 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -178,7 +178,6 @@ class DataSmart(MutableMapping):
try:
self.setVar(name, self.getVar(var, False))
self.delVar(var)
- self._seen_overrides[o].remove(var)
except Exception:
logger.info("Untracked delVar")
@@ -301,6 +300,10 @@ class DataSmart(MutableMapping):
def delVar(self, var):
self.expand_cache = {}
self.dict[var] = {}
+ if '_' in var:
+ override = var[var.rfind('_')+1:]
+ if override and override in self._seen_overrides and var in self._seen_overrides[override]:
+ self._seen_overrides[override].remove(var)
def setVarFlag(self, var, flag, flagvalue):
if not var in self.dict: