In EbuildProcess._start(), don't open the log file during the clean phase
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Nov 2008 21:28:58 +0000 (21:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Nov 2008 21:28:58 +0000 (21:28 -0000)
since the open file can result in an nfs lock on $T/build.log which prevents
the clean phase from removing $T. Thanks to Jeremy Olexa <darkside@g.o> for
reporting. (trunk r12016)

svn path=/main/branches/2.1.6/; revision=12017

pym/_emerge/__init__.py

index 689dffa2ffac585c3d4c9dc6f3e0a73c092ef25f..f261ebaf778d66950437e66802daa5eae16c3fca 100644 (file)
@@ -2866,7 +2866,11 @@ class EbuildProcess(SpawnProcess):
        __slots__ = ("phase", "pkg", "settings", "tree")
 
        def _start(self):
-               self.logfile = self.settings.get("PORTAGE_LOG_FILE")
+               # Don't open the log file during the clean phase since the
+               # open file can result in an nfs lock on $T/build.log which
+               # prevents the clean phase from removing $T.
+               if self.phase not in ("clean", "cleanrm"):
+                       self.logfile = self.settings.get("PORTAGE_LOG_FILE")
                SpawnProcess._start(self)
 
        def _pipe(self, fd_pipes):