From: Zac Medico Date: Sat, 7 Aug 2010 01:06:59 +0000 (-0700) Subject: Fix _getMissingProperties() package.properties handling so that settings X-Git-Tag: v2.2_rc68~366 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=03e6dd20e5c1a30540e1a17eabcd038a89254730;p=portage.git Fix _getMissingProperties() package.properties handling so that settings from more specific atoms override those of less specific atoms. --- diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 344810543..0540151a0 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1966,10 +1966,22 @@ class config(object): cp = cpv_getkey(cpv) cpdict = self._ppropertiesdict.get(cp) if cpdict: - accept_properties = list(self._accept_properties) cpv_slot = "%s:%s" % (cpv, metadata["SLOT"]) - for atom in match_to_list(cpv_slot, list(cpdict)): - accept_properties.extend(cpdict[atom]) + keys = list(cpdict) + pproperties_list = [] + while keys: + bestmatch = best_match_to_list(cpv_slot, keys) + if bestmatch: + keys.remove(bestmatch) + pproperties_list.append(cpdict[bestmatch]) + else: + break + if pproperties_list: + # reverse, so the most specific atoms come last + pproperties_list.reverse() + accept_properties = list(self._accept_properties) + for x in pproperties_list: + accept_properties.extend(x) properties = set(flatten(use_reduce(paren_reduce( metadata["PROPERTIES"]), matchall=1)))