On Thu, Oct 31, 2013 at 4:45 PM, Dave Reisner email@example.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"
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...