From fc0e49d98177691813fe81d0ef678bb7192180b3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 11 Jul 2010 14:25:21 -0700 Subject: Add FEATURES=unknown-features-warn, so the the warning about unknown FEATURES values can be disabled. --- pym/portage/const.py | 1 + pym/portage/package/ebuild/config.py | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'pym') 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.""" -- cgit v1.2.3-1-g7c22