diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-29 10:29:28 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-12 22:50:46 +0100 |
commit | a2599686112fca1c2a808fbea24bf10d5f89a74d (patch) | |
tree | 20bccd1a6c77f6ae6320ee22011821530610f010 /bitbake/lib/bb/data_smart.py | |
parent | 816acb6ee8ca8ac8791bf89c32aa45f808d5d52f (diff) | |
download | poky-a2599686112fca1c2a808fbea24bf10d5f89a74d.tar.gz |
bitbake: data_smart: Fix keys() missing overrides
d.keys() was not returning items which had no base content but the
variable came into existance through overrides. We have to process
self.overridedata to find these other variables.
(Bitbake rev: 77fc57c610d7f65f7e328ad555f525b2f8bdf1d7)
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.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 941c158f7d..b9c5d1e5b7 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -809,6 +809,7 @@ class DataSmart(MutableMapping): | |||
809 | 809 | ||
810 | def __iter__(self): | 810 | def __iter__(self): |
811 | deleted = set() | 811 | deleted = set() |
812 | overrides = set() | ||
812 | def keylist(d): | 813 | def keylist(d): |
813 | klist = set() | 814 | klist = set() |
814 | for key in d: | 815 | for key in d: |
@@ -816,6 +817,8 @@ class DataSmart(MutableMapping): | |||
816 | continue | 817 | continue |
817 | if key in deleted: | 818 | if key in deleted: |
818 | continue | 819 | continue |
820 | if key in overrides: | ||
821 | continue | ||
819 | if not d[key]: | 822 | if not d[key]: |
820 | deleted.add(key) | 823 | deleted.add(key) |
821 | continue | 824 | continue |
@@ -826,9 +829,21 @@ class DataSmart(MutableMapping): | |||
826 | 829 | ||
827 | return klist | 830 | return klist |
828 | 831 | ||
832 | self.need_overrides() | ||
833 | for var in self.overridedata: | ||
834 | for (r, o) in self.overridedata[var]: | ||
835 | if o in self.overridesset: | ||
836 | overrides.add(var) | ||
837 | elif "_" in o: | ||
838 | if set(o.split("_")).issubset(self.overridesset): | ||
839 | overrides.add(var) | ||
840 | |||
829 | for k in keylist(self.dict): | 841 | for k in keylist(self.dict): |
830 | yield k | 842 | yield k |
831 | 843 | ||
844 | for k in overrides: | ||
845 | yield k | ||
846 | |||
832 | def __len__(self): | 847 | def __len__(self): |
833 | return len(frozenset(self)) | 848 | return len(frozenset(self)) |
834 | 849 | ||