summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-07-11 14:25:21 -0700
committerZac Medico <zmedico@gentoo.org>2010-07-11 14:25:21 -0700
commitfc0e49d98177691813fe81d0ef678bb7192180b3 (patch)
tree74ec5a4da06ce583ba0fab30ffa26f291a90ee80
parentc3a6ff792ae64d8780748ef1b671e35dcc01a274 (diff)
downloadportage-fc0e49d98177691813fe81d0ef678bb7192180b3.tar.gz
portage-fc0e49d98177691813fe81d0ef678bb7192180b3.tar.bz2
portage-fc0e49d98177691813fe81d0ef678bb7192180b3.zip
Add FEATURES=unknown-features-warn, so the the warning about unknown FEATURES
values can be disabled.
-rw-r--r--cnf/make.globals3
-rw-r--r--man/make.conf.53
-rw-r--r--pym/portage/const.py1
-rw-r--r--pym/portage/package/ebuild/config.py21
4 files changed, 17 insertions, 11 deletions
diff --git a/cnf/make.globals b/cnf/make.globals
index 42e7d3215..78088e006 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -45,7 +45,8 @@ RESUMECOMMAND_RSYNC="rsync -avP \"\${URI}\" \"\${DISTDIR}/\${FILE}\""
# Default user options
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned
- sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
+ sandbox sfperms strict unknown-features-warn unmerge-logs
+ unmerge-orphans userfetch"
# Ignore file collisions in /lib/modules since files inside this directory
# are never unmerged, and therefore collisions must be ignored in order for
diff --git a/man/make.conf.5 b/man/make.conf.5
index b033e7ac0..71840f95a 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -438,6 +438,9 @@ If a file is not claimed by another package in the same slot and it is not
protected by \fICONFIG_PROTECT\fR, unmerge it even if the modification time or
checksum differs from the file that was originally installed.
.TP
+.B unknown\-features\-warn
+Warn if FEATURES contains one or more unknown values.
+.TP
.B userfetch
When portage is run as root, drop privileges to portage:portage during the
fetching of package sources.
diff --git a/pym/portage/const.py b/pym/portage/const.py
index 0865c02f7..dc8155102 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -94,6 +94,7 @@ SUPPORTED_FEATURES = frozenset([
"python-trace", "sandbox", "sesandbox", "severe", "sfperms",
"sign", "skiprocheck", "split-elog", "split-log", "splitdebug",
"strict", "stricter", "suidctl", "test", "test-fail-continue",
+ "unknown-features-warn",
"unmerge-logs", "unmerge-orphans", "userfetch", "userpriv",
"usersandbox", "usersync", "webrsync-gpg"])
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 2874dc3ce..b0fecae8f 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1152,16 +1152,17 @@ class config(object):
writemsg(_("!!! FEATURES=fakeroot is enabled, but the "
"fakeroot binary is not installed.\n"), noiselevel=-1)
- unsupported_features = []
- for x in self.features:
- if x not in SUPPORTED_FEATURES:
- unsupported_features.append(x)
-
- if unsupported_features:
- writemsg(colorize("BAD",
- _("FEATURES variable contains an unknown value(s): %s") % \
- ", ".join(unsupported_features)) \
- + "\n", noiselevel=-1)
+ if 'unknown-features-warn' in self.features:
+ unknown_features = []
+ for x in self.features:
+ if x not in SUPPORTED_FEATURES:
+ unknown_features.append(x)
+
+ if unknown_features:
+ writemsg(colorize("BAD",
+ _("FEATURES variable contains an unknown value(s): %s") % \
+ ", ".join(unknown_features)) \
+ + "\n", noiselevel=-1)
def loadVirtuals(self,root):
"""Not currently used by portage."""