summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-06 18:06:59 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-06 18:06:59 -0700
commit03e6dd20e5c1a30540e1a17eabcd038a89254730 (patch)
tree07aad79b9a85ca28a6ed0126748a05c4e67cdd2e
parentFix _getMissingLicenses() package.license handling so that settings (diff)
downloadportage-multirepo-03e6dd20e5c1a30540e1a17eabcd038a89254730.tar.gz
portage-multirepo-03e6dd20e5c1a30540e1a17eabcd038a89254730.tar.bz2
portage-multirepo-03e6dd20e5c1a30540e1a17eabcd038a89254730.zip
Fix _getMissingProperties() package.properties handling so that settings
from more specific atoms override those of less specific atoms.
-rw-r--r--pym/portage/package/ebuild/config.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 34481054..0540151a 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)))