From: Zac Medico Date: Thu, 26 May 2011 01:04:33 +0000 (-0700) Subject: FakeVartree: use live meta if installed EAPI ok X-Git-Tag: v2.2.0_alpha37~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d810f9a0b160a91fae059a5c32c1b673fe7be3be;p=portage.git FakeVartree: use live meta if installed EAPI ok This will fix bug #368725. --- diff --git a/pym/_emerge/FakeVartree.py b/pym/_emerge/FakeVartree.py index 8ed458dbb..a11966f89 100644 --- a/pym/_emerge/FakeVartree.py +++ b/pym/_emerge/FakeVartree.py @@ -94,8 +94,16 @@ class FakeVartree(vartree): repo = _gen_valid_repo(repo) live_metadata = dict(zip(self._portdb_keys, self._portdb.aux_get(pkg, self._portdb_keys, myrepo=repo))) - if not portage.eapi_is_supported(live_metadata["EAPI"]) or \ - installed_eapi != 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):