Make sure doebuild() doesn't erroneously unlink a logfile when returnpid
authorZac Medico <zmedico@gentoo.org>
Tue, 17 Aug 2010 07:23:36 +0000 (00:23 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 17 Aug 2010 07:23:36 +0000 (00:23 -0700)
is True.

pym/portage/package/ebuild/doebuild.py

index 621d1662d913948f52115a451ab6e79b7a8a12a5..c4a782c4e8455dc276c43b99743a6e0b27bffed8 100644 (file)
@@ -749,7 +749,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                        mysettings["DISTDIR"] = mysettings["PORTAGE_ACTUAL_DISTDIR"]
                        del mysettings["PORTAGE_ACTUAL_DISTDIR"]
 
-               if logfile:
+               if logfile and not returnpid:
                        try:
                                if os.stat(logfile).st_size == 0:
                                        os.unlink(logfile)