1 |
commit: 9dc72ec11c464f1fad4ddca0608a0593be23b9b5 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 30 20:24:19 2012 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Sun Dec 30 20:24:19 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=9dc72ec1 |
7 |
|
8 |
fix bug 449300, duped use flags due to non defaulted use flags added from eclasses not matching against IUSE defaults during set() duplicate elimination. |
9 |
|
10 |
--- |
11 |
pym/gentoolkit/flag.py | 6 ++++-- |
12 |
1 files changed, 4 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/pym/gentoolkit/flag.py b/pym/gentoolkit/flag.py |
15 |
index 9983ba7..d92d904 100644 |
16 |
--- a/pym/gentoolkit/flag.py |
17 |
+++ b/pym/gentoolkit/flag.py |
18 |
@@ -36,7 +36,10 @@ def get_iuse(cpv): |
19 |
""" |
20 |
try: |
21 |
# aux_get might return dupes, so run them through set() to remove them |
22 |
- return list(set(portage.db[portage.root]["porttree"].dbapi.aux_get(cpv, ["IUSE"])[0].split())) |
23 |
+ iuse = set(portage.db[portage.root]["porttree"].dbapi.aux_get(cpv, ["IUSE"])[0].split()) |
24 |
+ # there could still be dupes due to IUSE defaults |
25 |
+ iuse = [x for x in iuse if '+'+x not in iuse and '-'+x not in iuse] |
26 |
+ return list(iuse) |
27 |
except: |
28 |
return [] |
29 |
|
30 |
@@ -173,7 +176,6 @@ def get_flags(cpv, final_setting=False): |
31 |
""" |
32 |
final_use, use_expand_hidden, usemasked, useforced = get_all_cpv_use(cpv) |
33 |
iuse_flags = filter_flags(get_iuse(cpv), use_expand_hidden, usemasked, useforced) |
34 |
- #flags = filter_flags(use_flags, use_expand_hidden, usemasked, useforced) |
35 |
if final_setting: |
36 |
final_flags = filter_flags(final_use, use_expand_hidden, usemasked, useforced) |
37 |
return iuse_flags, final_flags |