From 0c1bbb316ce2e7e9608af78f5e2f5dea1c667af7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 14 Oct 2011 23:11:02 -0700 Subject: emerge --metadata: fix empty INHERITED handling Since changes to eclass validation code in commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212, validation of cache for packages with empty INHERITED metadata has been broken due to failure to distinguish between None and empty dict return values from eclass.cache.validate_and_rewrite_cache(). --- pym/portage/eclass_cache.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pym/portage/eclass_cache.py') diff --git a/pym/portage/eclass_cache.py b/pym/portage/eclass_cache.py index 2f6e94770..808662bd5 100644 --- a/pym/portage/eclass_cache.py +++ b/pym/portage/eclass_cache.py @@ -133,6 +133,11 @@ class cache(object): self._eclass_locations[ys] = x def validate_and_rewrite_cache(self, ec_dict, chf_type, stores_paths): + """ + This will return an empty dict if the ec_dict parameter happens + to be empty, therefore callers must take care to distinguish + between empty dict and None return values. + """ if not isinstance(ec_dict, dict): return None our_getter = operator.attrgetter(chf_type) -- cgit v1.2.3-1-g7c22