1 |
commit: 9144faeb653b9f1dbe74c69f85cd48f26761aa2f |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 2 02:12:52 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 2 02:12:52 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9144faeb |
7 |
|
8 |
KeywordsManager: support ~* in KEYWORDS |
9 |
|
10 |
This allows ~* in KEYWORDS to be match by any unstable keyword in the |
11 |
user's configuration, similar to how * in KEYWORDS already matches any |
12 |
user configuration. Thanks to Daniel Robbins <drobbins <AT> funtoo.org> for |
13 |
the suggestion. |
14 |
|
15 |
Also, the warning about * or -* in KEYWORDS is now gone, so that |
16 |
ebuilds from the funtoo tree will be usable without triggering |
17 |
warnings like this. If necessary, we can add ways to selectively |
18 |
enable these kinds of warnings via layout.conf and/or repos.conf. |
19 |
|
20 |
--- |
21 |
.../package/ebuild/_config/KeywordsManager.py | 16 ++++++++++------ |
22 |
1 files changed, 10 insertions(+), 6 deletions(-) |
23 |
|
24 |
diff --git a/pym/portage/package/ebuild/_config/KeywordsManager.py b/pym/portage/package/ebuild/_config/KeywordsManager.py |
25 |
index cd22554..c2b8343 100644 |
26 |
--- a/pym/portage/package/ebuild/_config/KeywordsManager.py |
27 |
+++ b/pym/portage/package/ebuild/_config/KeywordsManager.py |
28 |
@@ -206,12 +206,16 @@ class KeywordsManager(object): |
29 |
hasstable = False |
30 |
hastesting = False |
31 |
for gp in mygroups: |
32 |
- if gp == "*" or (gp == "-*" and len(mygroups) == 1): |
33 |
- writemsg(_("--- WARNING: Package '%(cpv)s' uses" |
34 |
- " '%(keyword)s' keyword.\n") % {"cpv": cpv, "keyword": gp}, |
35 |
- noiselevel=-1) |
36 |
- if gp == "*": |
37 |
- match = True |
38 |
+ if gp == "*": |
39 |
+ match = True |
40 |
+ break |
41 |
+ elif gp == "~*": |
42 |
+ hastesting = True |
43 |
+ for x in pgroups: |
44 |
+ if x[:1] == "~": |
45 |
+ match = True |
46 |
+ break |
47 |
+ if match: |
48 |
break |
49 |
elif gp in pgroups: |
50 |
match = True |