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 Todd Gamblin
parent 98b498c671
commit a69b3c85b0
No known key found for this signature in database
GPG Key ID: 66B24B9050FDD0B8

View File

@ -500,6 +500,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)