From 5b7f3a3e0adf303502efdbd84f6c9b89368f279b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 3 Feb 2026 07:41:28 -0700 Subject: [PATCH] lib/spack/spack/binary_distribution.py: silence warnings about non-existent index for mirrors, because this warning is issued for all mirrors (source, bootstrap, ...) --- lib/spack/spack/binary_distribution.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index e36a1574dd035f..e04be69ba49d31 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -374,8 +374,12 @@ def update(self, with_cooldown: bool = False) -> None: except FetchIndexError as e: fetch_errors.append(e) self._last_fetch_times[urlAndVersion] = (now, False) - except BuildcacheIndexNotExists as e: - fetch_errors.append(e) + except BuildcacheIndexNotExists: # as e: + # DH* JCSDA fork only - silence warnings about non-existent + # index for mirrors, because this warning is issued for all + # mirrors (source, bootstrap, ...) + # fetch_errors.append(e) + # *DH self._last_fetch_times[urlAndVersion] = (now, False) # Binary caches are not required to have an index, don't raise # if it doesn't exist. @@ -420,8 +424,12 @@ def update(self, with_cooldown: bool = False) -> None: except FetchIndexError as e: fetch_errors.append(e) self._last_fetch_times[urlAndVersion] = (now, False) - except BuildcacheIndexNotExists as e: - fetch_errors.append(e) + except BuildcacheIndexNotExists: # as e: + # DH* JCSDA fork only - silence warnings about non-existent + # index for mirrors, because this warning is issued for all + # mirrors (source, bootstrap, ...) + # fetch_errors.append(e) + # *DH self._last_fetch_times[urlAndVersion] = (now, False) # Binary caches are not required to have an index, don't raise # if it doesn't exist.