[pacman-dev] [PATCH] Added mirror support to makepkg's source array.

Sam Stuewe halosghost at archlinux.info
Wed Nov 20 12:22:36 EST 2013


Hey folks, I just wanted to throw a few things out in this discussion, 
if that's alright.

First, I like the idea of supporting mirrors, but I think we need to 
take certain factors into account that not all the proposals offered 
have. For example, not all the proposals take into account the 
possibility of supporting different protocols as the same mirror. This 
is one aspect where Allan's proposal is quite nice because the mirrors 
array would have you input full URLs including their protocol. However, 
not all mirrors follow the same directory hierarchy, so perhaps mirrored 
entries in the source array should be required to look something like 
this:

source=(mirrors://filename.tar.gz)
mirrors=('https://foo.br/whar/did/you/put/' 'ftp://bar.fu/put/it/here/')

Excluding the rest of the path so that the mirrors array allows for 
multiple longer URLs which might differ from one another on where the 
filename is located. The second bit that needs to be figured out is how 
best to offer the ability to mirror multiple files in the source array. 
Should it be done by having multiple mirrors arrays with slightly 
differing names? I honestly don't know, but personally, I find that to 
look ugly, so I'd recommend something else. Perhaps it would not be too 
difficult to add some kind of note to each entry in the mirrors array 
which denotes which source array entry it points to? E.g.,:

source=('mirrors://filename.tar.gz'
         'mirrors://namedfile.tar.gz')
mirrors=('0|https://foo.br/whar/did/you/put/'
          '0|ftp://bar.fu/put/it/here/'
          '1|http://fu.bar/it/be/here/'
          '1|sftp://bu.far/here/it/be/')

I know this is not terribly pretty, but it satisfies the need for 
supporting multiple mirrored sources and it uses a convention already in 
place (source array indexes), though it does refer to them in a new 
style. Anyway, that's just my two cents. I hope they were helpful.

All the best,

---
Sam Stuewe (a.k.a. HalosGhost)


More information about the pacman-dev mailing list