diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-23 12:32:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-25 08:18:13 +0000 |
commit | 544533922d73c9bbf2aaa537b4cb482a2b89e291 (patch) | |
tree | 693cd82d470c6dba2bac48d0a7e025a9df9e7210 /bitbake/lib/bb/data_smart.py | |
parent | 172ea4f79e3b5a4256604d404bc9f74c255a8c85 (diff) | |
download | 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>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 31ce9a5d15..68d273b3a6 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -740,12 +740,16 @@ class DataSmart(MutableMapping): | |||
740 | yield key | 740 | yield key |
741 | 741 | ||
742 | def __iter__(self): | 742 | def __iter__(self): |
743 | deleted = set() | ||
743 | def keylist(d): | 744 | def keylist(d): |
744 | klist = set() | 745 | klist = set() |
745 | for key in d: | 746 | for key in d: |
746 | if key == "_data": | 747 | if key == "_data": |
747 | continue | 748 | continue |
749 | if key in deleted: | ||
750 | continue | ||
748 | if not d[key]: | 751 | if not d[key]: |
752 | deleted.add(key) | ||
749 | continue | 753 | continue |
750 | klist.add(key) | 754 | klist.add(key) |
751 | 755 | ||