Skip to content

Commit 45341d8

Browse files
authored
lib/spack/spack/binary_distribution.py: silence warnings about non-existent index for mirrors, because this warning is issued for all mirrors (source, bootstrap, ...) (#575)
lib/spack/spack/binary_distribution.py: silence warnings about non-existent index for mirrors, because this warning is issued for all mirrors (source, bootstrap, ...), even if they don't have or don't need a build cache index to function correctly. See comments from Spack developers just below my changes. These warnings look like legitimate errors, clutter the output of automated build/deploy systems, and confuse users and developers. I do not indent to send this upstream but maintain the diff in our fork/branch.
1 parent 6621e1e commit 45341d8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lib/spack/spack/binary_distribution.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,12 @@ def update(self, with_cooldown: bool = False) -> None:
374374
except FetchIndexError as e:
375375
fetch_errors.append(e)
376376
self._last_fetch_times[urlAndVersion] = (now, False)
377-
except BuildcacheIndexNotExists as e:
378-
fetch_errors.append(e)
377+
except BuildcacheIndexNotExists: # as e:
378+
# DH* JCSDA fork only - silence warnings about non-existent
379+
# index for mirrors, because this warning is issued for all
380+
# mirrors (source, bootstrap, ...)
381+
# fetch_errors.append(e)
382+
# *DH
379383
self._last_fetch_times[urlAndVersion] = (now, False)
380384
# Binary caches are not required to have an index, don't raise
381385
# if it doesn't exist.
@@ -420,8 +424,12 @@ def update(self, with_cooldown: bool = False) -> None:
420424
except FetchIndexError as e:
421425
fetch_errors.append(e)
422426
self._last_fetch_times[urlAndVersion] = (now, False)
423-
except BuildcacheIndexNotExists as e:
424-
fetch_errors.append(e)
427+
except BuildcacheIndexNotExists: # as e:
428+
# DH* JCSDA fork only - silence warnings about non-existent
429+
# index for mirrors, because this warning is issued for all
430+
# mirrors (source, bootstrap, ...)
431+
# fetch_errors.append(e)
432+
# *DH
425433
self._last_fetch_times[urlAndVersion] = (now, False)
426434
# Binary caches are not required to have an index, don't raise
427435
# if it doesn't exist.

0 commit comments

Comments
 (0)