From: Zac Medico Date: Sun, 22 Apr 2012 22:11:16 +0000 (-0700) Subject: doebuild: cleanup tempfile if package phase fails X-Git-Tag: v2.2.0_alpha101~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ccefaf0cd5987eadebac66e4c15464b65795cda;p=portage.git doebuild: cleanup tempfile if package phase fails --- diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 29bef0917..da30bda38 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -1040,6 +1040,13 @@ def doebuild(myebuild, mydo, _unused=None, settings=None, debug=0, listonly=0, if mydo == "package" and bintree is not None: bintree.inject(mysettings.mycpv, filename=mysettings["PORTAGE_BINPKG_TMPFILE"]) + else: + if "PORTAGE_BINPKG_TMPFILE" in mysettings: + try: + os.unlink(mysettings["PORTAGE_BINPKG_TMPFILE"]) + except OSError: + pass + elif mydo=="qmerge": # check to ensure install was run. this *only* pops up when users # forget it and are using ebuild