summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
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:41 +0100
commit5c5b0045e8abf4f8e8d7e7e5977672bc3341882e (patch)
treefefe2f8d4d571522467c355c03ef7f7cc7a61218 /bitbake/lib/bb/data_smart.py
parentcc2a8ff5225e9fe987d8036970b2bf4293a13611 (diff)
downloadpoky-5c5b0045e8abf4f8e8d7e7e5977672bc3341882e.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. (Bitbake rev: 2b5548c591d4cfde9238d2cc0959c42cfc08f09c) 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.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 1fede8f01e..bc359de4f1 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -406,6 +406,8 @@ class DataSmart(MutableMapping):
406 for key in d: 406 for key in d:
407 if key == "_data": 407 if key == "_data":
408 continue 408 continue
409 if not d[key]:
410 continue
409 klist.add(key) 411 klist.add(key)
410 412
411 if "_data" in d: 413 if "_data" in d: