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

Ido Rosen ido at kernel.org
Thu Oct 31 16:53:36 EDT 2013


On Thu, Oct 31, 2013 at 4:51 PM, Ido Rosen <ido at kernel.org> wrote:

>
>
>
> On Thu, Oct 31, 2013 at 4:45 PM, Dave Reisner <d at falconindy.com> wrote:
>
>> On Thu, Oct 31, 2013 at 08:32:49PM +0000, Jerome Leclanche wrote:
>> > What about reusing the "filename" feature; if it sees multiple times
>> > the same files it treats it as a mirror, eg.
>> > "file.tar.gz::http://example.com/file.tar.gz"
>> > "file.tar.gz::http://mirror.example.com/file.tar.gz"
>> >
>> > J. Leclanche
>>
>> This can't work. If the first source fails to download, makepkg will
>> abort.
>>
>
> What about just detecting if source is an array/list (keep current
> behavior), or a dictionary/lookup table (new fancy mirror behavior)?  If
> it's a dictionary/lookup table, then try all mirrors before failing a
> source download.
>
> For examples of how to create lookup tables in bash, see
> http://stackoverflow.com/questions/1494178/how-to-define-hash-tables-in-bash...
>
>
Just to be clear, I meant a dictionary/lookup table of strings or list
values, e.g.:

source=( ["file.tar.gz"]=("http://a.com/file.tar.gz" "
http://b.com/file.tar.gz") ) # would indicate file.tar.gz has 2 mirror URLs.


More information about the aur-general mailing list