summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-10-02 14:51:48 +0200
committerGitHub <noreply@github.com>2023-10-02 14:51:48 +0200
commit6c4ce379ca0b43aecdc44e1ffd80058d70ddac93 (patch)
tree37c300927eba70d21e2bf481f6e77d14294870f7 /lib
parenta9dcba76ce96691aa44f63fa8caac953db5cdaa4 (diff)
downloadspack-6c4ce379ca0b43aecdc44e1ffd80058d70ddac93.tar.gz
spack-6c4ce379ca0b43aecdc44e1ffd80058d70ddac93.tar.bz2
spack-6c4ce379ca0b43aecdc44e1ffd80058d70ddac93.tar.xz
spack-6c4ce379ca0b43aecdc44e1ffd80058d70ddac93.zip
buildcache: ignore errors of newer buildcache version (#40279)
Currently buildcaches are forward incompatible in an annoying way: spack errors out when trying to use them. With this change, you just get a warning.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/binary_distribution.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index fc6056e6be..90cd577fe8 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -216,11 +216,11 @@ class BinaryCacheIndex:
with self._index_file_cache.read_transaction(cache_key):
db._read_from_file(cache_path)
except spack_db.InvalidDatabaseVersionError as e:
- msg = (
+ tty.warn(
f"you need a newer Spack version to read the buildcache index for the "
f"following mirror: '{mirror_url}'. {e.database_version_message}"
)
- raise BuildcacheIndexError(msg) from e
+ return
spec_list = db.query_local(installed=False, in_buildcache=True)