diff options
author | Brian Harring <ferringb@chromium.org> | 2011-10-13 16:26:03 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-10-13 17:19:26 -0700 |
commit | d4ea29bf6a3ce35d49e0f54f9173e3a6e42da2d6 (patch) | |
tree | c7e1a577542f7441a5d7591df538b336402b0e90 /pym/portage/dbapi/porttree.py | |
parent | bf28492ed8ccc7fd3679a8e5433101a0945d417d (diff) | |
download | portage-d4ea29bf6a3ce35d49e0f54f9173e3a6e42da2d6.tar.gz portage-d4ea29bf6a3ce35d49e0f54f9173e3a6e42da2d6.tar.bz2 portage-d4ea29bf6a3ce35d49e0f54f9173e3a6e42da2d6.zip |
layout.conf: make the pregenerated cache format controllable
Controllable via 'cache-format', currently it supports only one cache;
'pms', and defaults to it. If an unsupported cache-format is specified,
the cache is disabled. If pms is specified and metadata/cache directory
doesn't exist, the cache is disabled.
Finally, this rips out the best module support for locally overriding
the cache format used for pregenerated caches; this functionality made
zero sense (upstream determines the format, we use what is available).
Diffstat (limited to 'pym/portage/dbapi/porttree.py')
-rw-r--r-- | pym/portage/dbapi/porttree.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index ef2e08870..f48741b84 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -120,8 +120,6 @@ class portdbapi(dbapi): self._have_root_eclass_dir = os.path.isdir( os.path.join(self.settings.repositories.mainRepoLocation(), "eclass")) - self.metadbmodule = self.settings.load_best_module("portdbapi.metadbmodule") - #if the portdbapi is "frozen", then we assume that we can cache everything (that no updates to it are happening) self.xcache = {} self.frozen = 0 @@ -214,10 +212,10 @@ class portdbapi(dbapi): for x in self.porttrees: if x in self._pregen_auxdb: continue - if os.path.isdir(os.path.join(x, "metadata", "cache")): - conf = self.repositories.get_repo_for_location(x) - cache = self._pregen_auxdb[x] = self.metadbmodule( - x, "metadata/cache", filtered_auxdbkeys, readonly=True) + conf = self.repositories.get_repo_for_location(x) + cache = conf.get_pregenerated_cache(filtered_auxdbkeys, readonly=True) + if cache is not None: + self._pregen_auxdb[x] = cache try: cache.ec = self._repo_info[x].eclass_db except AttributeError: |