diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-31 23:52:50 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-09 22:43:44 +0100 |
| commit | eda23733f04bb118a6415fdf5bcef7ddfb368527 (patch) | |
| tree | 7ab54bbbe718004f2ab42e9a63377ca810107448 /bitbake/lib/bb/data_smart.py | |
| parent | 73871c27127820e962ef3c04389407de7e7491da (diff) | |
| download | poky-eda23733f04bb118a6415fdf5bcef7ddfb368527.tar.gz | |
bitbake/data_smart: Change overrides behaviour to remove expanded variables from the datastore
Currently if you do:
OVERRIDES = "z"
DEPENDS_prepend = "a "
DEPENDS = "b"
DEPENDS_z = "c"
d.update_data()
d.getVar("DEPENDS")
gives "a c"
d.update_data()
d.getVar("DEPENDS")
then gives "c"
This patch changes the behaviour such that at the time bitbake expands the DEPENDS_z
override, it removes "DEPENDS_z" from the data store. In the above example this would
mean that it wouldn't matter how often you call d.update_data(), you'd always get
"a c" back.
See the bitbake-devel mailing list for further discussion and analysis of the
potential impact of this change.
(Bitbake rev: 899d45b90061eb3cf3e71029072eee42cd80930c)
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 64a900c556..93c1b81aee 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
| @@ -172,11 +172,13 @@ class DataSmart(MutableMapping): | |||
| 172 | if o not in self._seen_overrides: | 172 | if o not in self._seen_overrides: |
| 173 | continue | 173 | continue |
| 174 | 174 | ||
| 175 | vars = self._seen_overrides[o] | 175 | vars = self._seen_overrides[o].copy() |
| 176 | for var in vars: | 176 | for var in vars: |
| 177 | name = var[:-l] | 177 | name = var[:-l] |
| 178 | try: | 178 | try: |
| 179 | self.setVar(name, self.getVar(var, False)) | 179 | self.setVar(name, self.getVar(var, False)) |
| 180 | self.delVar(var) | ||
| 181 | self._seen_overrides[o].remove(var) | ||
| 180 | except Exception: | 182 | except Exception: |
| 181 | logger.info("Untracked delVar") | 183 | logger.info("Untracked delVar") |
| 182 | 184 | ||
