summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-01 19:12:52 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-01 19:12:52 -0700
commit9144faeb653b9f1dbe74c69f85cd48f26761aa2f (patch)
tree8059ed5aa9a2110493b202a173aba7453fd6ddd9
parentfcba9794d9d377cafc60679fc800e3f5a5b506d7 (diff)
downloadportage-9144faeb653b9f1dbe74c69f85cd48f26761aa2f.tar.gz
portage-9144faeb653b9f1dbe74c69f85cd48f26761aa2f.tar.bz2
portage-9144faeb653b9f1dbe74c69f85cd48f26761aa2f.zip
KeywordsManager: support ~* in KEYWORDS
This allows ~* in KEYWORDS to be match by any unstable keyword in the user's configuration, similar to how * in KEYWORDS already matches any user configuration. Thanks to Daniel Robbins <drobbins@funtoo.org> for the suggestion. Also, the warning about * or -* in KEYWORDS is now gone, so that ebuilds from the funtoo tree will be usable without triggering warnings like this. If necessary, we can add ways to selectively enable these kinds of warnings via layout.conf and/or repos.conf.
-rw-r--r--pym/portage/package/ebuild/_config/KeywordsManager.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/pym/portage/package/ebuild/_config/KeywordsManager.py b/pym/portage/package/ebuild/_config/KeywordsManager.py
index cd225549e..c2b834344 100644
--- a/pym/portage/package/ebuild/_config/KeywordsManager.py
+++ b/pym/portage/package/ebuild/_config/KeywordsManager.py
@@ -206,12 +206,16 @@ class KeywordsManager(object):
hasstable = False
hastesting = False
for gp in mygroups:
- if gp == "*" or (gp == "-*" and len(mygroups) == 1):
- writemsg(_("--- WARNING: Package '%(cpv)s' uses"
- " '%(keyword)s' keyword.\n") % {"cpv": cpv, "keyword": gp},
- noiselevel=-1)
- if gp == "*":
- match = True
+ if gp == "*":
+ match = True
+ break
+ elif gp == "~*":
+ hastesting = True
+ for x in pgroups:
+ if x[:1] == "~":
+ match = True
+ break
+ if match:
break
elif gp in pgroups:
match = True