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 1QPU0r-0004MD-Nj for garchives@archives.gentoo.org; Thu, 26 May 2011 06:25:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3EB1E1C50B; Thu, 26 May 2011 06:18:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0C8281C52C for ; Thu, 26 May 2011 06:18: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 CD8751B4037 for ; Thu, 26 May 2011 06:18:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3E8C18050C for ; Thu, 26 May 2011 06:18:46 +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:2.1.9 commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/FakeVartree.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: cd6304f1245df0265d8f73f68d45a382a8f8ac1d Date: Thu, 26 May 2011 06:18:46 +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: 5fc4cd30ecb90e6fb9d5e10874357f09 commit: cd6304f1245df0265d8f73f68d45a382a8f8ac1d Author: Zac Medico gentoo org> AuthorDate: Thu May 26 01:04:33 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu May 26 06:12:38 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dcd6304f1 FakeVartree: use live meta if installed EAPI ok This will fix bug #368725. --- pym/_emerge/FakeVartree.py | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/pym/_emerge/FakeVartree.py b/pym/_emerge/FakeVartree.py index 61dd540..4bc6261 100644 --- a/pym/_emerge/FakeVartree.py +++ b/pym/_emerge/FakeVartree.py @@ -85,11 +85,23 @@ class FakeVartree(vartree): if pkg in self._aux_get_history: return self._aux_get(pkg, wants) self._aux_get_history.add(pkg) + # We need to check the EAPI, and this also raises + # a KeyError to the caller if appropriate. + installed_eapi, repo =3D self._aux_get(pkg, ["EAPI", "repository"]) try: # Use the live ebuild metadata if possible. live_metadata =3D dict(zip(self._portdb_keys, self._portdb.aux_get(pkg, self._portdb_keys))) - if not portage.eapi_is_supported(live_metadata["EAPI"]): + # Use the metadata from the installed instance if the EAPI + # of either instance is unsupported, since if the installed + # instance has an unsupported or corrupt EAPI then we don't + # want to attempt to do complex operations such as execute + # pkg_config, pkg_prerm or pkg_postrm phases. If both EAPIs + # are supported then go ahead and use the live_metadata, in + # order to respect dep updates without revision bump or EAPI + # bump, as in bug #368725. + if not (portage.eapi_is_supported(live_metadata["EAPI"]) and \ + portage.eapi_is_supported(installed_eapi)): raise KeyError(pkg) self.dbapi.aux_update(pkg, live_metadata) except (KeyError, portage.exception.PortageException):