summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-29 01:13:44 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-29 01:13:44 +0000
commit5b522cc22cfa0e8ec18b3c623e467f0a68cc4d4a (patch)
tree0542ae931b1b6df52b0608b12e945d374dc96276
parent3a251f2385961ee3eac5511d1ac4d9035b239123 (diff)
downloadportage-5b522cc22cfa0e8ec18b3c623e467f0a68cc4d4a.tar.gz
portage-5b522cc22cfa0e8ec18b3c623e467f0a68cc4d4a.tar.bz2
portage-5b522cc22cfa0e8ec18b3c623e467f0a68cc4d4a.zip
For bug #164078, don't trigger the CLEAN_DELAY countdown for autoclean operations since those are most likely unattended. Thanks to Dan <hydrogen@notyetimplemented.com> for the initial patch.
svn path=/main/trunk/; revision=5827
-rwxr-xr-xbin/emerge9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index ccc3f3279..8a76158af 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3067,7 +3067,7 @@ class MergeTask(object):
xsplit=portage.pkgsplit(x[2])
emergelog(xterm_titles, " >>> AUTOCLEAN: " + xsplit[0])
retval = unmerge(pkgsettings, self.myopts, vartree,
- "clean", [xsplit[0]], ldpath_mtimes)
+ "clean", [xsplit[0]], ldpath_mtimes, autoclean=1)
if not retval:
emergelog(xterm_titles,
" --- AUTOCLEAN: Nothing unmerged.")
@@ -3153,7 +3153,7 @@ class MergeTask(object):
return os.EX_OK
def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
- ldpath_mtimes):
+ ldpath_mtimes, autoclean=0):
candidate_catpkgs=[]
global_unmerge=0
xterm_titles = "notitles" not in settings.features
@@ -3405,7 +3405,8 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
print
return 0
#the real unmerging begins, after a short delay....
- countdown(int(settings["CLEAN_DELAY"]), ">>> Unmerging")
+ if not autoclean:
+ countdown(int(settings["CLEAN_DELAY"]), ">>> Unmerging")
for x in pkgmap.keys():
for y in pkgmap[x]["selected"]:
@@ -4798,7 +4799,7 @@ def action_build(settings, trees, mtimedb,
print ">>> Auto-cleaning packages..."
vartree = trees[settings["ROOT"]]["vartree"]
unmerge(settings, myopts, vartree, "clean", ["world"],
- ldpath_mtimes)
+ ldpath_mtimes, autoclean=1)
else:
portage.writemsg_stdout(colorize("WARN", "WARNING:")
+ " AUTOCLEAN is disabled. This can cause serious"