summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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)))