diff options
| -rwxr-xr-x | archsetup | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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" |
