summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/emerge28
1 files changed, 21 insertions, 7 deletions
diff --git a/bin/emerge b/bin/emerge
index 2c395af7b..6ec15dbe0 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3418,6 +3418,27 @@ if __name__ == "__main__":
settings["FEATURES"] = " ".join(settings.features)
settings.backup_changes("FEATURES")
+ CLEAN_DELAY = 5
+ try:
+ CLEAN_DELAY = int(settings.get("CLEAN_DELAY", str(CLEAN_DELAY)))
+ except ValueError, e:
+ portage.writemsg("!!! %s\n" % str(e), noiselevel=-1)
+ portage.writemsg("!!! Unable to parse integer: CLEAN_DELAY='%s'\n" % \
+ settings["CLEAN_DELAY"], noiselevel=-1)
+ settings["CLEAN_DELAY"] = str(CLEAN_DELAY)
+ settings.backup_changes("CLEAN_DELAY")
+
+ EMERGE_WARNING_DELAY = 10
+ try:
+ EMERGE_WARNING_DELAY = int(settings.get(
+ "EMERGE_WARNING_DELAY", str(EMERGE_WARNING_DELAY)))
+ except ValueError, e:
+ portage.writemsg("!!! %s\n" % str(e), noiselevel=-1)
+ portage.writemsg("!!! Unable to parse integer: EMERGE_WARNING_DELAY='%s'\n" % \
+ settings["EMERGE_WARNING_DELAY"], noiselevel=-1)
+ settings["EMERGE_WARNING_DELAY"] = str(EMERGE_WARNING_DELAY)
+ settings.backup_changes("EMERGE_WARNING_DELAY")
+
settings.lock()
if settings.get("NOCOLOR","") in ("yes","true"):
@@ -3584,13 +3605,6 @@ if __name__ == "__main__":
if not sys.stdout.isatty() or ("--nospinner" in myopts):
spinner.update = spinner.update_basic
- CLEAN_DELAY = 5
- EMERGE_WARNING_DELAY = 10
- if portage.settings["CLEAN_DELAY"]:
- CLEAN_DELAY = string.atoi("0"+portage.settings["CLEAN_DELAY"])
- if portage.settings["EMERGE_WARNING_DELAY"]:
- EMERGE_WARNING_DELAY = string.atoi("0"+portage.settings["EMERGE_WARNING_DELAY"])
-
if "--version" in myopts:
settings = portage.settings
print getportageversion(settings["PORTDIR"], settings["ROOT"],