diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcfe975..035b1ec 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 -v 'azure\.archive' "$M" | grep -c '://')" -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 -v 'azure\.archive' "$M" | grep -c '://')" -gt 0 ]; then + sudo sed -i '/azure\.archive/d' "$M" + echo "apt mirrors now:"; cat "$M" + fi sleep 10 done return 1