Bug #265768 - If the user happens to be using the metadata_overlay module
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:08:16 +0000 (07:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:08:16 +0000 (07:08 -0000)
then initialize it's eclass cache with an appropriate instance inside the
portdbapi constructor. (trunk r13329)

svn path=/main/branches/2.1.6/; revision=13494

pym/portage/dbapi/porttree.py

index a7e074d45845337f58906909bd71ad155f01c602..64212084df77f9421abee2b4a7516c9a0d6cc38d 100644 (file)
@@ -264,8 +264,8 @@ class portdbapi(dbapi):
                # ~harring
                filtered_auxdbkeys = filter(lambda x: not x.startswith("UNUSED_0"), auxdbkeys)
                filtered_auxdbkeys.sort()
+               from portage.cache import metadata_overlay, volatile
                if secpass < 1:
-                       from portage.cache import metadata_overlay, volatile
                        for x in self.porttrees:
                                db_ro = self.auxdbmodule(self.depcachedir, x,
                                        filtered_auxdbkeys, gid=portage_gid, readonly=True)
@@ -280,6 +280,8 @@ class portdbapi(dbapi):
                                # location, label, auxdbkeys
                                self.auxdb[x] = self.auxdbmodule(
                                        self.depcachedir, x, filtered_auxdbkeys, gid=portage_gid)
+                               if self.auxdbmodule is metadata_overlay.database:
+                                       self.auxdb[x].db_ro.ec = self._repo_info[x].eclass_db
                if "metadata-transfer" not in self.mysettings.features:
                        for x in self.porttrees:
                                if x in self._pregen_auxdb: