diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-12-09 13:25:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-09 13:25:32 +0100 |
commit | ec62150ed7e8c26eff322ffa66f0e7b4c8409734 (patch) | |
tree | aa06d9b86f03280ed4fa4d38f34ce9b026c85f3c | |
parent | d37dc37504bc3a348789d6dc4ccd265e62615741 (diff) | |
download | spack-ec62150ed7e8c26eff322ffa66f0e7b4c8409734.tar.gz spack-ec62150ed7e8c26eff322ffa66f0e7b4c8409734.tar.bz2 spack-ec62150ed7e8c26eff322ffa66f0e7b4c8409734.tar.xz spack-ec62150ed7e8c26eff322ffa66f0e7b4c8409734.zip |
binary distribution: warn about issues (#34152)
-rw-r--r-- | lib/spack/spack/binary_distribution.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 235b51973f..cae3985326 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -418,7 +418,12 @@ class BinaryCacheIndex(object): if all_methods_failed: raise FetchCacheError(fetch_errors) - elif spec_cache_regenerate_needed: + if fetch_errors: + tty.warn( + "The following issues were ignored while updating the indices of binary caches", + FetchCacheError(fetch_errors), + ) + if spec_cache_regenerate_needed: self.regenerate_spec_cache(clear_existing=spec_cache_clear_needed) def _fetch_and_cache_index(self, mirror_url, expect_hash=None): @@ -504,9 +509,9 @@ class BinaryCacheIndex(object): if fetched_hash is not None and locally_computed_hash != fetched_hash: msg = ( - "Computed hash ({0}) did not match remote ({1}), " + "Computed index hash [{0}] did not match remote [{1}, url:{2}] " "indicating error in index transmission" - ).format(locally_computed_hash, expect_hash) + ).format(locally_computed_hash, fetched_hash, hash_fetch_url) errors.append(RuntimeError(msg)) # We somehow got an index that doesn't match the remote one, maybe # the next time we try we'll be successful. |