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 1QPQPa-0004N2-RC for garchives@archives.gentoo.org; Thu, 26 May 2011 02:34:59 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3B631C001; Thu, 26 May 2011 02:34:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 64F2C1C001 for ; Thu, 26 May 2011 02:34:46 +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 C70321B400B for ; Thu, 26 May 2011 02:34:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 2DB8080505 for ; Thu, 26 May 2011 02:34:45 +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: cc7f820749411a2d8f2e3efff945837231bfd0eb Date: Thu, 26 May 2011 02:34:45 +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: 250b38def912b073173f273bbb7684b1 commit: cc7f820749411a2d8f2e3efff945837231bfd0eb Author: Zac Medico gentoo org> AuthorDate: Thu May 26 02:32:42 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu May 26 02:32:42 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dcc7f8207 dblink.unmerge: always initialize myebuildpath This is required for the doebuild_environment() call. Also, set builddir_locked =3D True when appropriate. --- pym/portage/dbapi/vartree.py | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 47952e7..976d8e3 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1655,13 +1655,12 @@ class dblink(object): contents =3D self.getcontents() # Now, don't assume that the name of the ebuild is the same as the # name of the dir; the package may have been moved. - myebuildpath =3D None + myebuildpath =3D os.path.join(self.dbdir, self.pkg + ".ebuild") failures =3D 0 ebuild_phase =3D "prerm" mystuff =3D os.listdir(self.dbdir) for x in mystuff: if x.endswith(".ebuild"): - myebuildpath =3D os.path.join(self.dbdir, self.pkg + ".ebuild") if x[:-7] !=3D self.pkg: # Clean up after vardbapi.move_ent() breakage in # portage versions before 2.1.2 @@ -1697,6 +1696,7 @@ class dblink(object): scheduler=3Dscheduler, settings=3Dself.settings) builddir_lock.lock() + builddir_locked =3D True prepare_build_dirs(settings=3Dself.settings, cleanup=3DTrue) log_path =3D self.settings.get("PORTAGE_LOG_FILE") =20 @@ -1710,7 +1710,7 @@ class dblink(object): level=3Dlogging.ERROR, noiselevel=3D-1) showMessage(_unicode_decode("%s\n") % (eapi_unsupported,), level=3Dlogging.ERROR, noiselevel=3D-1) - elif myebuildpath: + elif os.path.isfile(myebuildpath): phase =3D EbuildPhase(background=3Dbackground, phase=3Debuild_phase, scheduler=3Dscheduler, settings=3Dself.settings) @@ -1730,7 +1730,7 @@ class dblink(object): self.vartree.dbapi._fs_unlock() self._clear_contents_cache() =20 - if myebuildpath and not eapi_unsupported: + if not eapi_unsupported and os.path.isfile(myebuildpath): ebuild_phase =3D "postrm" phase =3D EbuildPhase(background=3Dbackground, phase=3Debuild_phase, scheduler=3Dscheduler, @@ -1748,7 +1748,7 @@ class dblink(object): self.vartree.dbapi._bump_mtime(self.mycpv) if builddir_locked: try: - if myebuildpath and not eapi_unsupported: + if not eapi_unsupported and os.path.isfile(myebuildpath): if retval !=3D os.EX_OK: msg_lines =3D [] msg =3D _("The '%(ebuild_phase)s' " @@ -1790,11 +1790,6 @@ class dblink(object): self._elog_process(phasefilter=3D("prerm", "postrm")) =20 if retval =3D=3D os.EX_OK and builddir_locked: - # myebuildpath might be None, so ensure - # it has a sane value for the clean phase, - # even though it won't really be sourced. - myebuildpath =3D os.path.join(self.dbdir, - self.pkg + ".ebuild") try: doebuild_environment(myebuildpath, "cleanrm", settings=3Dself.settings, db=3Dself.vartree.dbapi)