summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-07 10:32:28 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-07 10:32:28 +0000
commit995bc1ad3e197201b7e35db5a30e81540c35390c (patch)
treeb488e9f22d3aacd42b2336a1995b60faa4689e56 /pym
parent836b3c9b87ac2ff16a0d5136a03d3a506f2aaad3 (diff)
downloadportage-995bc1ad3e197201b7e35db5a30e81540c35390c.tar.gz
portage-995bc1ad3e197201b7e35db5a30e81540c35390c.tar.bz2
portage-995bc1ad3e197201b7e35db5a30e81540c35390c.zip
Make sure that each new build attempt gets it's own unique log file for bug #135856.
svn path=/main/trunk/; revision=3464
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 3ac06617a..8dc6d4c0c 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2860,6 +2860,16 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
"%s-%s.log" % (str(vartree.dbapi.get_counter_tick_core("/")),
mysettings["PF"]))
+ if logfile and mydo in actionmap_deps and "PORTAGE_CALLER" in os.environ \
+ and os.environ["PORTAGE_CALLER"] == "emerge":
+ # Increment the counter so that each new build attempt gets it's
+ # own unique log file (portage uses the counter for nothing more than
+ # log handling, though it can be used to determine merge order).
+ while os.path.exists(logfile):
+ logfile = os.path.join(mysettings["PORT_LOGDIR"],
+ "%s-%s.log" % (str(vartree.dbapi.counter_tick("/") + 1),
+ mysettings["PF"]))
+
# if any of these are being called, handle them -- running them out of the sandbox -- and stop now.
if mydo in ["clean","cleanrm"]:
return spawn(EBUILD_SH_BINARY+" clean",mysettings,debug=debug,free=1,logfile=None)