diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-17 17:34:52 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-28 15:27:41 +0100 |
commit | 1b5d7b59d330b49a25fe60aea22c2f3b59bfb5e1 (patch) | |
tree | 9062739127a1bed604b299037f35cf482d222d65 /bitbake/lib/bb/data_smart.py | |
parent | 5c5b0045e8abf4f8e8d7e7e5977672bc3341882e (diff) | |
download | poky-1b5d7b59d330b49a25fe60aea22c2f3b59bfb5e1.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.
(Bitbake rev: d924ff9ede57c3dea6e1c738ba3633f18d460b14)
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.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index bc359de4f1..8f67227bd6 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -178,7 +178,6 @@ class DataSmart(MutableMapping): | |||
178 | try: | 178 | try: |
179 | self.setVar(name, self.getVar(var, False)) | 179 | self.setVar(name, self.getVar(var, False)) |
180 | self.delVar(var) | 180 | self.delVar(var) |
181 | self._seen_overrides[o].remove(var) | ||
182 | except Exception: | 181 | except Exception: |
183 | logger.info("Untracked delVar") | 182 | logger.info("Untracked delVar") |
184 | 183 | ||
@@ -301,6 +300,10 @@ class DataSmart(MutableMapping): | |||
301 | def delVar(self, var): | 300 | def delVar(self, var): |
302 | self.expand_cache = {} | 301 | self.expand_cache = {} |
303 | self.dict[var] = {} | 302 | self.dict[var] = {} |
303 | if '_' in var: | ||
304 | override = var[var.rfind('_')+1:] | ||
305 | if override and override in self._seen_overrides and var in self._seen_overrides[override]: | ||
306 | self._seen_overrides[override].remove(var) | ||
304 | 307 | ||
305 | def setVarFlag(self, var, flag, flagvalue): | 308 | def setVarFlag(self, var, flag, flagvalue): |
306 | if not var in self.dict: | 309 | if not var in self.dict: |