mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
@@ -740,12 +740,16 @@ class DataSmart(MutableMapping):
|
|||||||
yield key
|
yield key
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
|
deleted = set()
|
||||||
def keylist(d):
|
def keylist(d):
|
||||||
klist = set()
|
klist = set()
|
||||||
for key in d:
|
for key in d:
|
||||||
if key == "_data":
|
if key == "_data":
|
||||||
continue
|
continue
|
||||||
|
if key in deleted:
|
||||||
|
continue
|
||||||
if not d[key]:
|
if not d[key]:
|
||||||
|
deleted.add(key)
|
||||||
continue
|
continue
|
||||||
klist.add(key)
|
klist.add(key)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user