From 604d535e2b08262cfce698543042af590f2e3550 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 25 Aug 2025 19:03:20 +0000 Subject: [PATCH 1/2] fix: clear cache and retry on cvmfs installation failure --- setup-cvmfs.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setup-cvmfs.sh b/setup-cvmfs.sh index 8389158..bee701f 100755 --- a/setup-cvmfs.sh +++ b/setup-cvmfs.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# Fail on errors +set -e + # Platform specific install if [ "$(uname)" == "Linux" ]; then # download from cache @@ -23,7 +26,16 @@ if [ "$(uname)" == "Linux" ]; then echo "::group::Installing cvmfs" sudo rm -f /var/lib/man-db/auto-update sudo apt-get -q update + # Attempt install sudo apt-get -q -y install cvmfs + if [ $? -ne 0 ]; then + # If it fails, try to clear cache and try again + echo "First attempt to install cvmfs failed, trying to clear cache and retrying" + sudo rm -rf /var/cache/apt/archives + sudo rm -rf /var/cache/apt/lists + sudo apt-get -q update + sudo apt-get -q -y install cvmfs + fi # install cvmfs config package if [ "${CVMFS_CONFIG_PACKAGE}" == "cvmfs-config-default" ]; then sudo apt-get -q -y install cvmfs-config-default From 4d04595be631e0ea303a91537ba7efc0604b4c53 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 25 Aug 2025 14:22:07 -0500 Subject: [PATCH 2/2] Remove `set -e` again --- setup-cvmfs.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup-cvmfs.sh b/setup-cvmfs.sh index bee701f..f885f1e 100755 --- a/setup-cvmfs.sh +++ b/setup-cvmfs.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -# Fail on errors -set -e - # Platform specific install if [ "$(uname)" == "Linux" ]; then # download from cache