From 46e50e5c69b0414353dde882d5751e2a990e7a9c Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Fri, 23 Oct 2026 16:23:58 +0000 Subject: [PATCH 1/2] ci: a failed apt try drops the slow Azure mirror, the next one takes archive.ubuntu.com (#101) The runners' apt sources use mirror+file:/etc/apt/apt-mirrors.txt with Azure's mirror first; apt moves to the next only when a download fails, not when it is slow, so every retry went to the same mirror (PR #100: 4 MB of 109 MB in 15 minutes). After a failed or timed-out try the Azure line is removed (once, only if another mirror is left) and the list printed; partial downloads resume on the next mirror. --- .github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcfe975..f64e6f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -310,6 +310,14 @@ jobs: ps -C apt-get,dpkg,http,https,gpgv,store -o pid,etime,args || true [ "$try" -lt 3 ] || break sudo timeout 60 dpkg --configure -a || true + # The Azure mirror can be slow for hours (#101): the next try + # takes the next mirror and resumes the partial downloads + M=/etc/apt/apt-mirrors.txt + if grep -q 'azure\.archive' "$M" 2>/dev/null && + [ "$(grep -vc 'azure\.archive' "$M")" -gt 0 ]; then + sudo sed -i '/azure\.archive/d' "$M" + echo "apt mirrors now:"; cat "$M" + fi sleep 10 done return 1 @@ -399,6 +407,14 @@ jobs: ps -C apt-get,dpkg,http,https,gpgv,store -o pid,etime,args || true [ "$try" -lt 3 ] || break sudo timeout 60 dpkg --configure -a || true + # The Azure mirror can be slow for hours (#101): the next try + # takes the next mirror and resumes the partial downloads + M=/etc/apt/apt-mirrors.txt + if grep -q 'azure\.archive' "$M" 2>/dev/null && + [ "$(grep -vc 'azure\.archive' "$M")" -gt 0 ]; then + sudo sed -i '/azure\.archive/d' "$M" + echo "apt mirrors now:"; cat "$M" + fi sleep 10 done return 1 From caa06c1f314b23a4d1333a7c6db93798ee22deaf Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Fri, 23 Oct 2026 16:27:16 +0000 Subject: [PATCH 2/2] ci: the Azure mirror is dropped only when a mirror URL is left, not a blank or comment line (#101) Review fix (Qodo). --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f64e6f6..035b1ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -314,7 +314,7 @@ jobs: # takes the next mirror and resumes the partial downloads M=/etc/apt/apt-mirrors.txt if grep -q 'azure\.archive' "$M" 2>/dev/null && - [ "$(grep -vc 'azure\.archive' "$M")" -gt 0 ]; then + [ "$(grep -v 'azure\.archive' "$M" | grep -c '://')" -gt 0 ]; then sudo sed -i '/azure\.archive/d' "$M" echo "apt mirrors now:"; cat "$M" fi @@ -411,7 +411,7 @@ jobs: # takes the next mirror and resumes the partial downloads M=/etc/apt/apt-mirrors.txt if grep -q 'azure\.archive' "$M" 2>/dev/null && - [ "$(grep -vc 'azure\.archive' "$M")" -gt 0 ]; then + [ "$(grep -v 'azure\.archive' "$M" | grep -c '://')" -gt 0 ]; then sudo sed -i '/azure\.archive/d' "$M" echo "apt mirrors now:"; cat "$M" fi