From c0d83a4c75ae97d64b28f291c9f007c2bcb86d6e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 11 Jun 2026 11:34:22 -0500 Subject: fix(install): retry the bulk package-cache refresh A single slow mirror (fastly, <1 byte/sec on one signature file) halted a full install at the -Syu step, which had no retry while every per-package install gets three attempts. The refresh now shares MAX_INSTALL_RETRIES; pacman resumes partial downloads, so a transient stall recovers. --- archsetup | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/archsetup b/archsetup index 13ee7a0..3f4821f 100755 --- a/archsetup +++ b/archsetup @@ -851,8 +851,21 @@ prerequisites() { (pacman-key --populate archlinux >> "$logfile" 2>&1) || \ error_fatal "verifying Arch Linux keys" "$?" + # The bulk refresh gets the same retry budget as per-package installs — + # a single slow mirror ("Operation too slow") halted a full install at + # this step on 2026-06-11. pacman picks up where it left off on retry, + # so transient mirror stalls recover instead of killing the run. action="refreshing the package cache" && display "task" "$action" - (pacman -Syu --noconfirm >> "$logfile" 2>&1) || error_fatal "$action" "$?" + refresh_ok=false + for attempt in $(seq 1 "$MAX_INSTALL_RETRIES"); do + if pacman -Syu --noconfirm >> "$logfile" 2>&1; then + refresh_ok=true + break + fi + [ "$attempt" -lt "$MAX_INSTALL_RETRIES" ] && \ + display "task" "retrying package cache refresh (attempt $((attempt + 1))/$MAX_INSTALL_RETRIES)" + done + $refresh_ok || error_fatal "$action" "$?" display "subtitle" "Required Software" -- cgit v1.2.3