Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 330611 - mirrorselect should verify that the file downloaded in deep mode downloaded correctly
Summary: mirrorselect should verify that the file downloaded in deep mode downloaded c...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-31 13:05 UTC by Soren Harward
Modified: 2010-08-02 17:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Soren Harward 2010-07-31 13:05:36 UTC
Running mirrorselect in deep mode causes it to download a 100k test file from the server.  However, mirrorselect never checks if the file was downloaded correctly.  So if an HTTP server is having problems and returns an error page that's only 1k instead of the file that is 100k, mirrorselect is going to think that the server is really fast and put it at the head of the list, instead of correctly realizing that the server is having problems and should be dropped from the results.

I suggest checking the result from urllib to see if the file was reported as downloaded correctly, and then checking to see if the correct number of bytes were received; if you wanted to get really thorough, you could also check if the file downloaded matched an MD5 or SHA1 checksum.
Comment 1 Christian Ruppert (idl0r) gentoo-dev 2010-08-02 17:07:36 UTC
Thanks!
Should be fixed in app-portage/mirrorselect-2.1.0-r2, please test :)