]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake/data_smart: Change overrides behaviour to remove expanded variables from...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 31 May 2011 22:52:50 +0000 (23:52 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Jun 2011 21:42:08 +0000 (22:42 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/data_smart.py

index 64a900c556aae85d59cc79faa0c5d7d3fffc39eb..93c1b81aeeed73e4fe9d0b048c00ebaa9a913573 100644 (file)
@@ -172,11 +172,13 @@ class DataSmart(MutableMapping):
             if o not in self._seen_overrides:
                 continue
 
-            vars = self._seen_overrides[o]
+            vars = self._seen_overrides[o].copy()
             for var in vars:
                 name = var[:-l]
                 try:
                     self.setVar(name, self.getVar(var, False))
+                    self.delVar(var)
+                    self._seen_overrides[o].remove(var)
                 except Exception:
                     logger.info("Untracked delVar")