Bug #239006 - In FakeVartree._aux_get_wrapper(), fall back to vdb metadata
authorZac Medico <zmedico@gentoo.org>
Mon, 29 Sep 2008 16:58:48 +0000 (16:58 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 29 Sep 2008 16:58:48 +0000 (16:58 -0000)
if the live ebuild's EAPI is unsupported.

svn path=/main/trunk/; revision=11600

pym/_emerge/__init__.py

index 000f2f6dcabbe5637e2e96c84a60f94b872100b3..ac168bd1f0c139f33e3d632f942302d4d6113008 100644 (file)
@@ -1102,7 +1102,7 @@ class FakeVartree(portage.vartree):
                self._match = self.dbapi.match
                self.dbapi.match = self._match_wrapper
                self._aux_get_history = set()
-               self._portdb_keys = ["DEPEND", "RDEPEND", "PDEPEND"]
+               self._portdb_keys = ["EAPI", "DEPEND", "RDEPEND", "PDEPEND"]
                self._portdb = portdb
                self._global_updates = None
 
@@ -1128,6 +1128,8 @@ class FakeVartree(portage.vartree):
                        # Use the live ebuild metadata if possible.
                        live_metadata = dict(izip(self._portdb_keys,
                                self._portdb.aux_get(pkg, self._portdb_keys)))
+                       if not portage.eapi_is_supported(live_metadata["EAPI"]):
+                               raise KeyError(pkg)
                        self.dbapi.aux_update(pkg, live_metadata)
                except (KeyError, portage.exception.PortageException):
                        if self._global_updates is None: