Add FEATURES=unknown-features-warn, so the the warning about unknown FEATURES
authorZac Medico <zmedico@gentoo.org>
Sun, 11 Jul 2010 21:25:21 +0000 (14:25 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 11 Jul 2010 21:25:21 +0000 (14:25 -0700)
values can be disabled.

cnf/make.globals
man/make.conf.5
pym/portage/const.py
pym/portage/package/ebuild/config.py

index 42e7d3215c41e53fb2b8ff9b6e088522e8b9d1d9..78088e006d99d98cde0405cacef5a39b506daeee 100644 (file)
@@ -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
index b033e7ac0763041969da59f784948b539b775f99..71840f95a05133944f219e0a00d0260b364dd07b 100644 (file)
@@ -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.
index 0865c02f72e068e47685a3f40a5d0c0b95615667..dc8155102ccd42866dfe78f002438e06fdd61657 100644 (file)
@@ -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"])
 
index 2874dc3ce71fbd4244d5cf5a3cdb70841c645c79..b0fecae8f169c834a2a5ca24d4b38e8388a56a4a 100644 (file)
@@ -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."""