summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/porttree.py
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2011-12-09 05:43:20 +0100
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2011-12-09 05:43:20 +0100
commit4e87ba4eb94c0ad1615c9926650a8925d5688393 (patch)
tree4d93e3de565ae356053e83cf1059f0dcd29fafa2 /pym/portage/dbapi/porttree.py
parentd5700b8579a9a8756b0a0e4b1ae801322593d28b (diff)
downloadportage-4e87ba4eb94c0ad1615c9926650a8925d5688393.tar.gz
portage-4e87ba4eb94c0ad1615c9926650a8925d5688393.tar.bz2
portage-4e87ba4eb94c0ad1615c9926650a8925d5688393.zip
Add eclass_db attribute in portage.repository.config.RepoConfig objects.
Diffstat (limited to 'pym/portage/dbapi/porttree.py')
-rw-r--r--pym/portage/dbapi/porttree.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 15f1faf3a..94961dda1 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -111,7 +111,7 @@ class portdbapi(dbapi):
":".join(filter(None, sandbox_write))
self.porttrees = list(self.settings.repositories.repoLocationList())
- self.eclassdb = eclass_cache.cache(self.settings.repositories.mainRepoLocation())
+ self.eclassdb = self.repositories.mainRepo().eclass_db
# This is used as sanity check for aux_get(). If there is no
# root eclass dir, we assume that PORTDIR is invalid or
@@ -126,23 +126,11 @@ class portdbapi(dbapi):
#Create eclass dbs
self._repo_info = {}
- eclass_dbs = {self.settings.repositories.mainRepoLocation() : self.eclassdb}
for repo in self.repositories:
if repo.location in self._repo_info:
continue
- eclass_db = None
- for eclass_location in repo.eclass_locations:
- tree_db = eclass_dbs.get(eclass_location)
- if tree_db is None:
- tree_db = eclass_cache.cache(eclass_location)
- eclass_dbs[eclass_location] = tree_db
- if eclass_db is None:
- eclass_db = tree_db.copy()
- else:
- eclass_db.append(tree_db)
-
- self._repo_info[repo.location] = _repo_info(repo.name, repo.location, eclass_db)
+ self._repo_info[repo.location] = _repo_info(repo.name, repo.location, repo.eclass_db)
#Keep a list of repo names, sorted by priority (highest priority first).
self._ordered_repo_name_list = tuple(reversed(self.repositories.prepos_order))