Write repo caches in specfile specific files

In this way we'll never encounter weird errors, when bumping the
specfile version. There are other unrelated issues with repo caches,
but those can be resolved separately.
This commit is contained in:
Massimiliano Culpo 2025-01-09 17:00:27 +01:00
parent 791c35ae5b
commit c43673f63b
No known key found for this signature in database
GPG Key ID: 3E52BB992233066C

View File

@ -600,7 +600,9 @@ def _build_index(self, name: str, indexer: Indexer):
"""Determine which packages need an update, and update indexes."""
# Filename of the provider index cache (we assume they're all json)
cache_filename = f"{name}/{self.namespace}-index.json"
cache_filename = (
f"{name}/{self.namespace}-specfile_v{spack.spec.SPECFILE_FORMAT_VERSION}-index.json"
)
# Compute which packages needs to be updated in the cache
index_mtime = self.cache.mtime(cache_filename)