summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/main.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-03 04:05:54 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-03 04:05:54 -0700
commitd776c545e620c25da8e034b3f2c69145fcc3d617 (patch)
treeebca90cdac26c5cf13d3db11de647754476d3387 /pym/_emerge/main.py
parent78f9a904ff356e2765a7a4e9f8eb3ad19e10846e (diff)
downloadportage-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.
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r--pym/_emerge/main.py15
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)