Mirrors: perform checksum of fetched sources

Since cache_mirror does the fetch itself, it also needs to do the
checksum itself if it wants to verify that the source stored in the
mirror is valid. Note that this isn't strictly required because fetching
(including from mirrors) always separately verifies the checksum.
This commit is contained in:
Peter Josef Scheibel 2019-11-26 19:23:38 -08:00 committed by Massimiliano Culpo
parent b2cc50aa6a
commit 754dd6eb1f

View File

@ -502,6 +502,7 @@ def cache_mirror(self, stats):
stats.already_existed(absolute_storage_path)
else:
self.fetch()
self.check()
spack.caches.mirror_cache.store(
self.fetcher, self.mirror_paths.storage_path)
stats.added(absolute_storage_path)