if x in self._pregen_auxdb:
continue
if os.path.isdir(os.path.join(x, "metadata", "cache")):
- self._pregen_auxdb[x] = self.metadbmodule(
+ conf = self.repositories.get_repo_for_location(x)
+ cache = self._pregen_auxdb[x] = self.metadbmodule(
x, "metadata/cache", filtered_auxdbkeys, readonly=True)
+ cache.is_authorative = conf.cache_is_authorative
try:
- self._pregen_auxdb[x].ec = self._repo_info[x].eclass_db
+ cache.ec = self._repo_info[x].eclass_db
except AttributeError:
pass
# Selectively cache metadata in order to optimize dep matching.
eapi = metadata.get('EAPI', '').strip()
if not eapi:
eapi = '0'
- if not (eapi[:1] == '-' and eapi_is_supported(eapi[1:])) and \
- emtime == metadata['_mtime_'] and \
- eclass_db.is_eclass_data_valid(metadata['_eclasses_']):
- doregen = False
+ if not (eapi[:1] == '-' and eapi_is_supported(eapi[1:])):
+ if auxdb.is_authorative or ( \
+ emtime == metadata['_mtime_'] and \
+ eclass_db.is_eclass_data_valid(metadata['_eclasses_'])):
+ doregen = False
if not doregen:
break
__slots__ = ['aliases', 'eclass_overrides', 'eclass_locations', 'location', 'user_location', 'masters', 'main_repo',
'missing_repo_name', 'name', 'priority', 'sync', 'format', 'sign_manifest', 'thin_manifest',
- 'allow_missing_manifest', 'create_manifest', 'disable_manifest']
+ 'allow_missing_manifest', 'create_manifest', 'disable_manifest', 'cache_is_authorative']
def __init__(self, name, repo_opts):
"""Build a RepoConfig with options in repo_opts
self.allow_missing_manifest = False
self.create_manifest = True
self.disable_manifest = False
+ self.cache_is_authorative = False
def load_manifest(self, *args, **kwds):
kwds['thin'] = self.thin_manifest
repo.allow_missing_manifest = manifest_policy != 'strict'
repo.create_manifest = manifest_policy != 'false'
repo.disable_manifest = manifest_policy == 'false'
+ repo.cache_is_authorative = layout_data.get('authorative-cache', 'false').lower() == 'true'
#Take aliases into account.
new_prepos = {}