Specify repo in FakeVartree._aux_get_wrapper().
authorSebastian Luther <SebastianLuther@gmx.de>
Sun, 17 Oct 2010 16:56:00 +0000 (09:56 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 17 Oct 2010 16:56:00 +0000 (09:56 -0700)
pym/_emerge/FakeVartree.py

index 64a39cf4d961b5fc69c153167ee488935f97d027..b83dd654b11097f6f13e47d0a35fbbf0210ed1c2 100644 (file)
@@ -9,6 +9,7 @@ from _emerge.Package import Package
 from _emerge.PackageVirtualDbapi import PackageVirtualDbapi
 from portage.const import VDB_PATH
 from portage.dbapi.vartree import vartree
+from portage.repository.config import _gen_valid_repo
 from portage.update import grab_updates, parse_updates, update_dbentries
 
 if sys.hexversion >= 0x3000000:
@@ -87,8 +88,10 @@ class FakeVartree(vartree):
                self._aux_get_history.add(pkg)
                try:
                        # Use the live ebuild metadata if possible.
+                       repo = self._aux_get(pkg, ["repository"])[0]
+                       repo = _gen_valid_repo(repo)
                        live_metadata = dict(zip(self._portdb_keys,
-                               self._portdb.aux_get(pkg, self._portdb_keys)))
+                               self._portdb.aux_get(pkg, self._portdb_keys, myrepo=repo)))
                        if not portage.eapi_is_supported(live_metadata["EAPI"]):
                                raise KeyError(pkg)
                        self.dbapi.aux_update(pkg, live_metadata)