From d776c545e620c25da8e034b3f2c69145fcc3d617 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 3 Sep 2010 04:05:54 -0700 Subject: Make emerge display a warning message if FEATURES contains keepwork or keeptemp since these features may confuse users and lead them to report invalid bugs. --- pym/_emerge/main.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 4c8a547b5..455072654 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -958,10 +958,25 @@ def parse_opts(tmpcmdline, silent=False): return myaction, myopts, myfiles +# Warn about features that may confuse users and +# lead them to report invalid bugs. +_emerge_features_warn = frozenset(['keeptemp', 'keepwork']) + def validate_ebuild_environment(trees): + features_warn = set() for myroot in trees: settings = trees[myroot]["vartree"].settings settings.validate() + features_warn.update( + _emerge_features_warn.intersection(settings.features)) + + if features_warn: + msg = "WARNING: The FEATURES variable contains one " + \ + "or more values that should be disabled under " + \ + "normal circumstances: %s" % " ".join(features_warn) + out = portage.output.EOutput() + for line in textwrap.wrap(msg, 65): + out.ewarn(line) def apply_priorities(settings): ionice(settings) -- cgit v1.2.3-1-g7c22