From 9ccefaf0cd5987eadebac66e4c15464b65795cda Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 22 Apr 2012 15:11:16 -0700 Subject: [PATCH] doebuild: cleanup tempfile if package phase fails --- pym/portage/package/ebuild/doebuild.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.26.2