From c3a6ff792ae64d8780748ef1b671e35dcc01a274 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 11 Jul 2010 14:13:49 -0700 Subject: [PATCH] Move the check for unsupported FEATURES to config.validate(). --- pym/portage/package/ebuild/config.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index a3a372e71..2874dc3ce 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1152,6 +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) + def loadVirtuals(self,root): """Not currently used by portage.""" writemsg("DEPRECATED: portage.config.loadVirtuals\n") @@ -2183,18 +2194,6 @@ class config(object): myflags = [] continue - if mykey == "FEATURES": - if x[:1] in ("+", "-"): - val = x[1:] - else: - val = x - - if val not in SUPPORTED_FEATURES: - writemsg(colorize("BAD", - _("FEATURES variable contains an unknown value: %s") % x) \ - + "\n", noiselevel=-1) - continue - if x[0]=="+": # Not legal. People assume too much. Complain. writemsg(colorize("BAD", -- 2.26.2