diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-03 04:05:54 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-03 04:05:54 -0700 |
commit | d776c545e620c25da8e034b3f2c69145fcc3d617 (patch) | |
tree | ebca90cdac26c5cf13d3db11de647754476d3387 | |
parent | 78f9a904ff356e2765a7a4e9f8eb3ad19e10846e (diff) | |
download | portage-d776c545e620c25da8e034b3f2c69145fcc3d617.tar.gz portage-d776c545e620c25da8e034b3f2c69145fcc3d617.tar.bz2 portage-d776c545e620c25da8e034b3f2c69145fcc3d617.zip |
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.
-rw-r--r-- | pym/_emerge/main.py | 15 |
1 files changed, 15 insertions, 0 deletions
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) |