diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-07-11 14:13:49 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-07-11 14:13:49 -0700 |
commit | c3a6ff792ae64d8780748ef1b671e35dcc01a274 (patch) | |
tree | b8649117886a7e33ff00d4cd9c7b55da0282a0cb | |
parent | eaa7b327ac17c3357e26010e927c74d4510b5b63 (diff) | |
download | portage-c3a6ff792ae64d8780748ef1b671e35dcc01a274.tar.gz portage-c3a6ff792ae64d8780748ef1b671e35dcc01a274.tar.bz2 portage-c3a6ff792ae64d8780748ef1b671e35dcc01a274.zip |
Move the check for unsupported FEATURES to config.validate().
-rw-r--r-- | pym/portage/package/ebuild/config.py | 23 |
1 files 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", |