From 5c5b0045e8abf4f8e8d7e7e5977672bc3341882e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 17 Jun 2011 17:32:21 +0100 Subject: 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 --- bitbake/lib/bb/data_smart.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake/lib/bb') 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): for key in d: if key == "_data": continue + if not d[key]: + continue klist.add(key) if "_data" in d: -- cgit v1.2.3-54-g00ecf