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 ) id 1Q3x2X-0005Gj-S4 for garchives@archives.gentoo.org; Sun, 27 Mar 2011 20:58:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25FD71C141; Sun, 27 Mar 2011 20:57:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EF75F1C141 for ; Sun, 27 Mar 2011 20:57:58 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7B32B1B41A1 for ; Sun, 27 Mar 2011 20:57:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D8A018006E for ; Sun, 27 Mar 2011 20:57:57 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: a46057efe4782553e8e292759c6153b27e4b4fe9 Date: Sun, 27 Mar 2011 20:57:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 4510b84d5bbbe50e2fed7550861fb8a2 commit: a46057efe4782553e8e292759c6153b27e4b4fe9 Author: Zac Medico gentoo org> AuthorDate: Sun Mar 27 20:57:35 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Mar 27 20:57:35 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Da46057ef unmerge: fix lock/UnsupportedAPIException logic --- pym/portage/dbapi/vartree.py | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index dd041d8..afcbdc9 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1544,16 +1544,21 @@ class dblink(object): myebuildpath =3D None =20 builddir_lock =3D None + log_path =3D None scheduler =3D self._scheduler retval =3D os.EX_OK try: - builddir_lock =3D EbuildBuildDir( - scheduler=3Dscheduler, - settings=3Dself.settings) - builddir_lock.lock() - prepare_build_dirs(settings=3Dself.settings, cleanup=3DTrue) - log_path =3D self.settings.get("PORTAGE_LOG_FILE") if myebuildpath: + # Only create builddir_lock if doebuild_environment + # succeeded, since that's needed to initialize + # PORTAGE_BUILDDIR. + builddir_lock =3D EbuildBuildDir( + scheduler=3Dscheduler, + settings=3Dself.settings) + builddir_lock.lock() + prepare_build_dirs(settings=3Dself.settings, cleanup=3DTrue) + log_path =3D self.settings.get("PORTAGE_LOG_FILE") + phase =3D EbuildPhase(background=3Dbackground, phase=3Debuild_phase, scheduler=3Dscheduler, settings=3Dself.settings) @@ -1668,7 +1673,7 @@ class dblink(object): =20 self._elog_process(phasefilter=3D("prerm", "postrm")) =20 - if retval =3D=3D os.EX_OK: + if retval =3D=3D os.EX_OK and builddir_lock is not None: # myebuildpath might be None, so ensure # it has a sane value for the clean phase, # even though it won't really be sourced.