From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-451904-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1SM50S-0001If-1o
	for garchives@archives.gentoo.org; Sun, 22 Apr 2012 22:11:44 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 8E0ACE0985;
	Sun, 22 Apr 2012 22:11:30 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 61C02E0985
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Apr 2012 22:11:30 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id A283A1B40EC
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Apr 2012 22:11:29 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 642ADE5402
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Apr 2012 22:11:28 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <1335132676.9ccefaf0cd5987eadebac66e4c15464b65795cda.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
X-VCS-Repository: proj/portage
X-VCS-Files: pym/portage/package/ebuild/doebuild.py
X-VCS-Directories: pym/portage/package/ebuild/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: 9ccefaf0cd5987eadebac66e4c15464b65795cda
X-VCS-Branch: master
Date: Sun, 22 Apr 2012 22:11:28 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 9a26de69-589a-4227-bcc3-e07c2251c2b8
X-Archives-Hash: ed2a9724c9ff448eec3d4d5be862c4ec

commit:     9ccefaf0cd5987eadebac66e4c15464b65795cda
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 22 22:11:16 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Apr 22 22:11:16 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3D9ccefaf0

doebuild: cleanup tempfile if package phase fails

---
 pym/portage/package/ebuild/doebuild.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package=
/ebuild/doebuild.py
index 29bef09..da30bda 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1040,6 +1040,13 @@ def doebuild(myebuild, mydo, _unused=3DNone, setti=
ngs=3DNone, debug=3D0, listonly=3D0,
 				if mydo =3D=3D "package" and bintree is not None:
 					bintree.inject(mysettings.mycpv,
 						filename=3Dmysettings["PORTAGE_BINPKG_TMPFILE"])
+			else:
+				if "PORTAGE_BINPKG_TMPFILE" in mysettings:
+					try:
+						os.unlink(mysettings["PORTAGE_BINPKG_TMPFILE"])
+					except OSError:
+						pass
+
 		elif mydo=3D=3D"qmerge":
 			# check to ensure install was run.  this *only* pops up when users
 			# forget it and are using ebuild