summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-23 12:32:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-25 08:18:13 +0000
commit544533922d73c9bbf2aaa537b4cb482a2b89e291 (patch)
tree693cd82d470c6dba2bac48d0a7e025a9df9e7210
parent172ea4f79e3b5a4256604d404bc9f74c255a8c85 (diff)
downloadast2050-yocto-poky-544533922d73c9bbf2aaa537b4cb482a2b89e291.zip
ast2050-yocto-poky-544533922d73c9bbf2aaa537b4cb482a2b89e291.tar.gz
bitbake: data_smart: Ensure d.keys() doesn't list deleted variables
If you copy the datastore, then delete a variable, it still shows up in d.keys() when it should not. This patch addresses the issue. (Bitbake rev: f28ee1bb03cb32d3757fbef67c9fbe143e3dadfa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/data_smart.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 31ce9a5..68d273b 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -740,12 +740,16 @@ class DataSmart(MutableMapping):
yield key
def __iter__(self):
+ deleted = set()
def keylist(d):
klist = set()
for key in d:
if key == "_data":
continue
+ if key in deleted:
+ continue
if not d[key]:
+ deleted.add(key)
continue
klist.add(key)
OpenPOWER on IntegriCloud