In EbuildProcess._start(), don't open the log file during the clean phase
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Nov 2008 21:28:09 +0000 (21:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Nov 2008 21:28:09 +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.

svn path=/main/trunk/; revision=12016

pym/_emerge/__init__.py

index 72f48a31a9e110cf0583a3c8bf5d31f250234dbc..8978c46840a18b5f46d18a8f34a5de677dc4e5e9 100644 (file)
@@ -2885,7 +2885,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):