aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2012-12-30 20:24:19 (GMT)
committerBrian Dolbec <dolsen@gentoo.org>2012-12-30 20:24:19 (GMT)
commit9dc72ec11c464f1fad4ddca0608a0593be23b9b5 (patch)
treea5bd5eb3041d6b8eddc23e9316e9f5512f769282
parentfix bug 445904 make.conf path (diff)
downloadgentoolkit-9dc72ec11c464f1fad4ddca0608a0593be23b9b5.zip
gentoolkit-9dc72ec11c464f1fad4ddca0608a0593be23b9b5.tar.gz
gentoolkit-9dc72ec11c464f1fad4ddca0608a0593be23b9b5.tar.bz2
fix bug 449300, duped use flags due to non defaulted use flags added from eclasses not matching against IUSE defaults during set() duplicate elimination.
-rw-r--r--pym/gentoolkit/flag.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/gentoolkit/flag.py b/pym/gentoolkit/flag.py
index 9983ba7..d92d904 100644
--- a/pym/gentoolkit/flag.py
+++ b/pym/gentoolkit/flag.py
@@ -36,7 +36,10 @@ def get_iuse(cpv):
"""
try:
# aux_get might return dupes, so run them through set() to remove them
- return list(set(portage.db[portage.root]["porttree"].dbapi.aux_get(cpv, ["IUSE"])[0].split()))
+ iuse = set(portage.db[portage.root]["porttree"].dbapi.aux_get(cpv, ["IUSE"])[0].split())
+ # there could still be dupes due to IUSE defaults
+ iuse = [x for x in iuse if '+'+x not in iuse and '-'+x not in iuse]
+ return list(iuse)
except:
return []
@@ -173,7 +176,6 @@ def get_flags(cpv, final_setting=False):
"""
final_use, use_expand_hidden, usemasked, useforced = get_all_cpv_use(cpv)
iuse_flags = filter_flags(get_iuse(cpv), use_expand_hidden, usemasked, useforced)
- #flags = filter_flags(use_flags, use_expand_hidden, usemasked, useforced)
if final_setting:
final_flags = filter_flags(final_use, use_expand_hidden, usemasked, useforced)
return iuse_flags, final_flags