[aur-general] Support for source mirror lists in PKGBUILD

Ido Rosen ido at kernel.org
Fri Nov 1 12:14:25 EDT 2013


On Fri, Nov 1, 2013 at 7:21 AM, Rashif Ray Rahman <schiv at archlinux.org>wrote:

> On 1 November 2013 18:58,  <alexander.r at gmx.com> wrote:
> > Are you trying tio re-implement Metalinks? They have become standartized
> way to do what you want ages
> > ago. They are even supported by curl! Add metalink file to package (or
> reference one from upstream),
> > redefine DLAGENTS to something like 'metalink::/usr/bin/curl --metalink
> %u' and, if possible, convince
> > makepkg developers to add that DLAGENT to default makepkg.conf. Voilà,
> no one's KISS principles
> > violated.
>
> IMHO, this sounds better than a buildscript full of hyperlinks.
> Alternative mirrors should be an optional feature. I'd even go as far
> as to suggest just having a .mirrors file (lowercase to differentiate
> it from pacman files) with a list of optional locations for each
> source, while adding a bit of code to makepkg to go through the list
> if the primary source locations fail for whatever reason. But that's
> my uninformed opinion.
>
>
> --
> GPG/PGP ID: C0711BF1
>

If metalinks/some external file are the only way to do this, you would need
a local source entry for the metalink / mirrors file AND a reference to
each file to pull from that metalink/mirrors file in the source array:  (1)
This breaks something conceptually to me, since the PKGBUILD is no longer
the self-contained descriptor of where to get everything and how to put it
all together into the package, now you need this other file or that other
file at download-time (rather than just at prepare()/build()/package()
time).  (2) It also is less KISS than just having multiple source array
entries for a mirrored file, since the packager and the person reading the
package now need to understand another file format to parse out where the
file is coming from.  (3) Since there are extra files you're carrying along
and it's not clear that those files are only needed at prepare() or build()
time, now they're needed at initial download time, and the ordering of the
source array becomes important, since you need the metalink/mirrors local
file before the metalink link itself...

I'm not opposed to adding metalink, torrent, carrier pigeon, and sneakernet
support to DLAGENTS by default, but the simple mirror case that solves this
99% of the time ("file A can come from locations X or Y") is trivially and
more KISS-ably solved by having two entries for file A in the source
array...


More information about the aur-general mailing list