def iter_pregenerated_caches(self, auxdbkeys, readonly=True, force=False): """ Reads layout.conf cache-formats from left to right and yields cache instances for each supported type that's found. If no cache-formats are specified in layout.conf, 'pms' type is assumed if the metadata/cache directory exists or force is True. """ formats = self.cache_formats if not formats: if not force: return # The default egencache format was 'pms' prior to portage-2.1.11.32 # (portage versions prior to portage-2.1.11.14 will NOT # recognize md5-dict format unless it is explicitly listed in # layout.conf). formats = ('md5-dict',) for fmt in formats: name = None if fmt == 'pms': from portage.cache.metadata import database name = 'metadata/cache' elif fmt == 'md5-dict': from portage.cache.flat_hash import md5_database as database name = 'metadata/md5-cache' if name is not None: yield database(self.location, name, auxdbkeys, readonly=readonly)
def iter_pregenerated_caches(self, auxdbkeys, readonly=True, force=False): """ Reads layout.conf cache-formats from left to right and yields cache instances for each supported type that's found. If no cache-formats are specified in layout.conf, 'pms' type is assumed if the metadata/cache directory exists or force is True. """ formats = self.cache_formats if not formats: if not force: return formats = ('pms',) for fmt in formats: name = None if fmt == 'pms': from portage.cache.metadata import database name = 'metadata/cache' elif fmt == 'md5-dict': from portage.cache.flat_hash import md5_database as database name = 'metadata/md5-cache' if name is not None: yield database(self.location, name, auxdbkeys, readonly=readonly)
def iter_pregenerated_caches(self, auxdbkeys, readonly=True, force=False): """ Reads layout.conf cache-formats from left to right and yields cache instances for each supported type that's found. If no cache-formats are specified in layout.conf, 'pms' type is assumed if the metadata/cache directory exists or force is True. """ formats = self.cache_formats if not formats: if not force: return # The default egencache format was 'pms' prior to portage-2.1.11.32 # (portage versions prior to portage-2.1.11.14 will NOT # recognize md5-dict format unless it is explicitly listed in # layout.conf). formats = ('md5-dict', ) for fmt in formats: name = None if fmt == 'pms': from portage.cache.metadata import database name = 'metadata/cache' elif fmt == 'md5-dict': from portage.cache.flat_hash import md5_database as database name = 'metadata/md5-cache' if name is not None: yield database(self.location, name, auxdbkeys, readonly=readonly)