summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-17 17:32:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-28 15:27:00 +0100
commit2b5548c591d4cfde9238d2cc0959c42cfc08f09c (patch)
treed06d910b63a2f0cf4227adba0d711671af0055c9
parent9d43e3279895639ee4899df635f2546c7ee13737 (diff)
downloadbitbake-2b5548c591d4cfde9238d2cc0959c42cfc08f09c.tar.gz
bitbake/data_smart: Don't export deleted/empty entries in the list of keys
If you d.delVar(), you expect the variable to be gone. Even empty variables continue to exist in the datastore and are still user visible unfortunately. The COW siutation means you can't just remove it since it might unmask a variable from an inner copy. This patch therefore stops empty variables from appearing in key lists exposed to the external world making empty variables an internal implementation detail only. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/data_smart.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 1fede8f01..bc359de4f 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -406,6 +406,8 @@ class DataSmart(MutableMapping):
for key in d:
if key == "_data":
continue
+ if not d[key]:
+ continue
klist.add(key)
if "_data" in d: