-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
According to #archlinux reflector is dying; possible replacements are
rate-mirrors has the big advantage of being able to quickly find zero in on the fastest mirrors globally by spidering through
fastest countries, though always starting from the US; that means no need to pin to guess a country here:
arch-conf/kousu-base/src/usr/share/libalpm/scripts/reflectorconf
Lines 3 to 12 in b94285b
| # detect our current country | |
| # use mirrors from there | |
| IP=$(timeout 30 curl -s ipinfo.io | jq -r .ip | head -n1) | |
| COUNTRY=$(timeout 30 whois -H --no-recursion "$IP" | grep Country | head -n 1 | cut -f 2 -d : | tr -d '[:space:]') | |
| if [ -z "$COUNTRY" ]; then | |
| # default if failed | |
| COUNTRY="CA" | |
| fi | |
| export COUNTRY | |
| sh "$1" > "$2" |
arch-conf/kousu-base/src/usr/share/reflector/reflector.conf.in
Lines 8 to 13 in b94285b
| cat <<EOF | |
| --save /etc/pacman.d/mirrorlist | |
| --protocol https | |
| --fastest 3 | |
| --country ${COUNTRY} | |
| EOF |
Both of these have the big disadvantage (for how I've designed things) of being AUR packages.
reflector is part of the official arch installer so like, it's probably not that urgent.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels