[aur-general] [RFC] command in PKGBUILD to select archlinux mirror to download from

Rafael Ferreira rafael.f.f1 at gmail.com
Thu Feb 5 16:34:48 UTC 2015

Hi there

I'm look for a way to set the PKGBUILD's source=() to fetch file from
archlinux repository without needing to set "ftp.archlinux.org" (which
is throttled in 50Kb/s) or any other specific mirror (in order to
avoid slow connection in distant geographic locations).

FYI, some PKGBUILDs in AUR need to fetch from archlinux repository,
like lib32-pam, lib32-avahi, lib32-smbclient. So, a solution for this
issue might might provide better experience for end-user from AUR

One too much lazy solution (but works) is to grep one server from
mirrorlist (e.g.: first) and get specifically the prefix of the URL,
which will be completed in the source array:
  _srcurl=`grep -m 1 ^Server /etc/pacman.d/mirrorlist`
  _srcurl=${_srcurl/Server = /}

Any other idea?  Comments are welcome.

More information about the aur-general mailing list