From 2b5548c591d4cfde9238d2cc0959c42cfc08f09c 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. Signed-off-by: Richard Purdie --- lib/bb/data_smart.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/bb/data_smart.py') 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: -- cgit 1.2.3-korg