1 |
If the configuration has keywords "foo bar", and a package has "-foo |
2 |
bar", mask the package ("masked by -bar keyword"). |
3 |
|
4 |
This is the sensible behavior if we ever make use of listing multiple |
5 |
keywords in the configuration, which is currently implemented but not |
6 |
used for anything. |
7 |
|
8 |
Signed-off-by: Daniel Barkalow <barkalow@××××××××.org> |
9 |
--- |
10 |
main/trunk/pym/portage.py | 11 +++++++---- |
11 |
1 files changed, 7 insertions(+), 4 deletions(-) |
12 |
|
13 |
diff -u a/main/trunk/pym/portage.py b/main/trunk/pym/portage.py |
14 |
--- a/main/trunk/pym/portage.py |
15 |
+++ b/main/trunk/pym/portage.py |
16 |
@@ -4097,9 +4097,11 @@ def getmaskingstatus(mycpv, settings=Non |
17 |
|
18 |
kmask = "missing" |
19 |
|
20 |
- for keyword in pgroups: |
21 |
- if keyword in mygroups: |
22 |
+ for keyword in mygroups: |
23 |
+ if keyword in pgroups: |
24 |
kmask=None |
25 |
+ elif keyword[0]=="-" and keyword[1:] in pgroups: |
26 |
+ kmask=keyword |
27 |
|
28 |
if kmask: |
29 |
fallback = None |
30 |
@@ -5614,14 +5616,15 @@ class portdbapi(dbapi): |
31 |
writemsg("--- WARNING: Package '%s' uses '*' keyword.\n" % mycpv, |
32 |
noiselevel=-1) |
33 |
match=1 |
34 |
- break |
35 |
elif gp in pgroups: |
36 |
match=1 |
37 |
- break |
38 |
elif gp[0] == "~": |
39 |
hastesting = True |
40 |
elif gp[0] != "-": |
41 |
hasstable = True |
42 |
+ elif gp[1:] in pgroups: |
43 |
+ match=0 |
44 |
+ break |
45 |
if not match and ((hastesting and "~*" in pgroups) or (hasstable and "*" in pgroups)): |
46 |
match=1 |
47 |
if match and eapi_is_supported(eapi): |
48 |
-- |
49 |
gentoo-portage-dev@g.o mailing list |