diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-05-25 18:04:33 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-05-25 23:12:38 -0700 |
commit | cd6304f1245df0265d8f73f68d45a382a8f8ac1d (patch) | |
tree | 4ab3c2f075b62ab56aa45e8af0bc8bbeb28afd6e | |
parent | 318b20fcd16111a51dd2e91be3772de8287740d5 (diff) | |
download | portage-cd6304f1245df0265d8f73f68d45a382a8f8ac1d.tar.gz portage-cd6304f1245df0265d8f73f68d45a382a8f8ac1d.tar.bz2 portage-cd6304f1245df0265d8f73f68d45a382a8f8ac1d.zip |
FakeVartree: use live meta if installed EAPI ok
This will fix bug #368725.
-rw-r--r-- | 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 61dd54061..4bc6261ec 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 = self._aux_get(pkg, ["EAPI", "repository"]) try: # Use the live ebuild metadata if possible. live_metadata = 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): |