Re: Metalink downloader with libcurl
Date: Sun, 15 Apr 2007 13:08:33 -0400
MetaDL 0.2 has been released.
It uses expat for XML parsing and xyssl for checksums. It only
supports 1 url at a time (no segmented downloads) with easy, but is an
improvement over what was used before in the Wubi installer. No chunk
checksum support yet (afaik), which will be really useful, but it does
do full file checksums. Earlier, I forgot to add that MetaDL resumes
downloads. Metalinks list mirrors and checksums in XML for higher
availability and integrity.
MetaDL 0.2 - metalink downloading plugin for NSIS
Copyright (c) 2007 Hampus Wessman
HOW IT BEHAVES
The plugin first looks for the local-file. If it exists it checks the
hashes and if none fails it is done! Otherwise the old file is deleted
(if there was one) and it looks for a file names local-file.partial.
If there is one it continues at the end of the file, otherwise it
creates one. Then the downloading begins. Mirrors are selected at
random to begin with, but errors and in which order they was last
tested is remember. After a while it picks the "best" server to try. I
won't get into details about this, but it works quite well.
If errors occur then it updates the info about the mirrors (in memory)
and checks if any more retries should be done (depends on 'max
tries'). This the total number of tries (not per mirror). When the
file is downloaded the checksums are checked. If the file doesn't
validate it is deleted and the process starts over again (depending on
'hash tries'). If the file is correct, then it is renamed to 'local-
If the downloaded file ends with ".metalink" it is parsed and, if it
is a metalink file, all the files described in the metalink will be
downloaded as described above, to the same directory as the metalink.
If any of these files also are metalinks, they won't get parsed
If not "cancel" or "success" is returned, an error message will always
be returned instead, that explains what went wrong!
-- (( Anthony Bryan )) Metalink [ http://www.metalinker.org ]Received on 2007-04-15