summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/package/ebuild/config.py33
1 files changed, 21 insertions, 12 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index e41760b50..ab042a235 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -202,6 +202,11 @@ class config(object):
self._accept_properties = None
self._features_overrides = []
+ # _unknown_features records unknown features that
+ # have triggered warning messages, and ensures that
+ # the same warning isn't shown twice.
+ self._unknown_features = set()
+
self.local_config = local_config
self._local_repo_configs = None
@@ -234,6 +239,9 @@ class config(object):
self._use_manager = clone._use_manager
self._mask_manager = clone._mask_manager
+ # shared mutable attributes
+ self._unknown_features = clone._unknown_features
+
self.modules = copy.deepcopy(clone.modules)
self._penv = copy.deepcopy(clone._penv)
@@ -861,18 +869,6 @@ class config(object):
writemsg(_("!!! FEATURES=fakeroot is enabled, but the "
"fakeroot binary is not installed.\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 unknown value(s): %s") % \
- ", ".join(unknown_features)) \
- + "\n", noiselevel=-1)
-
def load_best_module(self,property_string):
best_mod = best_from_dict(property_string,self.modules,self.module_priority)
mod = None
@@ -1916,6 +1912,19 @@ class config(object):
self.features._features.update(self.get('FEATURES', '').split())
self.features._sync_env_var()
+ if 'unknown-features-warn' in self.features:
+ unknown_features = \
+ self.features._features.difference(SUPPORTED_FEATURES)
+ if unknown_features:
+ unknown_features = \
+ unknown_features.difference(self._unknown_features)
+ if unknown_features:
+ self._unknown_features.update(unknown_features)
+ writemsg_level(colorize("BAD",
+ _("FEATURES variable contains unknown value(s): %s") % \
+ ", ".join(sorted(unknown_features))) \
+ + "\n", noiselevel=-1)
+
myflags.update(self.useforce)
arch = self.configdict["defaults"].get("ARCH")
if arch: