[gobolinux-devel] FetchArchive mirror_urls functionality

teique teique at gmail.com
Thu Aug 17 16:29:12 GMT 2006


# (package Compile 1.6.0)

# hi,
# what about rewrite the mirror_urls functionality this way:
# urls variable could easly be feed with the mirrors also, by recipe 
creator, like this:
# (these are not valid links, only a short example...)
urls=(
   "http://xorg0.freedesktop.org/releases/xorg-server-X11R7.1-1.1.0.tar.bz2"
   "http://xorg1.freedesktop.org/releases/xorg-server-X11R7.1-1.1.0.tar.bz2"
   "http://xorg2.freedesktop.org/releases/xorg-server-X11R7.1-1.1.0.tar.bz2"
   "http://xorg3.freedesktop.org/releases/xorg-server-X11R7.1-1.1.0.tar.bz2"
   "$httpSourceforge/mesa3d/MesaLib-6.5.tar.bz2"
)

# three things would happen:
#   1st - a copy of this array would be made to a new one at 
FetchArchive named urlsMirrors=("${urls[@]}")
#   2nd - httpSourceforge entry would be expanded to several entries,
#         one for each of the known valid SourceForge mirrors inside 
urlsMirrors variable
#   3rd - urls variable would be "cleaned" so only one URL entry per 
file would be kept (no mirrors)

# this way, variable urls matches current implementation and we can work 
with urlsMirrors to easly feed
# mirror_urls variable at each file download loop at FetchArchive
# so the line that makes use of mirror_urls would be changed from
fetch="${mirror_urls[(mirrorlevel-1)*urlcount+fileindex]}"
# to
fetch="${mirror_urls[(mirrorlevel-1)]}"

# the main idea is to keep the main mirror_urls funcionality that is 
already implemented
# and add support to SourceForge and others, automatic mirrors, and also 
package creator
# custom mirrors in a simple way to implement and maintain

# I wonder if it is safe to change the way it works concerning mirror_urls?
# As I couldnt find a sample recipe using mirror_urls, I mean, as it 
doesnt seem to be being used,
# I think there is no problem if I create a patch changing it.

# related email: "Re: [gobolinux-users] cant install xorg 7.1, Compile 
freezes" 08/14/06 11:13



More information about the gobolinux-devel mailing list