On 01/11/13 20:00, Florian Pritz wrote:
> From: Ido Rosen <[email protected]>
> 
> To specify multiple mirrors, simply add multiple files to the source array
> that have the same downloaded filename, e.g.:
> 
> source=("file.tar.gz::http://mirror1.example.com/file.tar.gz";
>         "file.tar.gz::http://mirror2.example.com/file.tar.gz";)
> 
> ...makepkg will try them all, and if all fail, will abort.  This also applies
> to VCS repositories and local files references in the source array, so for
> example:
> 
> source=("git+https://github.com/torvalds/linux.git
>         
> "git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git";)
> 
> ...will allow cloning the git repository from GitHub if kernel.org is down or
> fails.
> 
> Signed-off-by: Florian Pritz <[email protected]>


We discussed this on IRC.   I really dislike the multiple source lines
"downloading" the same file approach.

An idea is doing:

source=("mirror://file.tar.gz")
mirror=("http://foo.com/"; "http://bar.com/";)

makepkg would replace "mirror://" in the source line with a value from
the "mirror" array and try downloading from each one until success or
total failure.

To allow multiple sources to have different mirrors, I am proposing we
detect an unknown protocol in the url and look for the corresponding
array.  e.g. we could have source=("sourceforge://file.tar.gz") and look
for the "sourceforge" array.

Comments or other ideas?

Allan


Reply via email to