On Wed, Apr 25, 2012 at 08:49:48PM +0100, Kevin Chadwick wrote:
I use rankmirrors and I notice on timeouts pacman automatically switches. Today, though most packages downloaded quickly from the mirror just selected by rankmirrors, one or two went very very slow. I guess differing routes by different package requests.
How about ranking mirrors by a metric that's actually meaningful? rankmirrors uses ping, which is utterly worthless, as you're seeing right here. Mirror selection should be based on: 1) locality (and hopefully that correlates with speed) 2) update-to-date-ness We provide a tool on www.archlinux.org [1] that offers this already. If you suffer from the inability to make decisions, you can use Reflector, which merely parses a JSON representation of this page and suggests something for you.
Would it be easy to add a ^S (Ctrl-S) to tell pacman to stop and retry at the next mirror. If I ever find the time, not too likely for a while, I might look into it. Just figured if anyone had worked on it and thought yeah I could just change that then it wold be worth flinging the idea at the devs.
I'm glad you've thought this through. Ctrl-S is the canonical key combination for most terminals to trigger flow control off. If you'd like to actually code this up, you'll need to rig up a non-blocking FD connected to stdin of the controlling terminal. Make sure it's portable to BSD, Cygwin, and OSX. d [1] http://www.archlinux.org/mirrors/status/