FS#2952 - Sortmirrors.pl removing mirrors

Attached to Project: Pacman
Opened by Dusty Phillips (Dusty) - Tuesday, 12 July 2005, 02:19 GMT
Last edited by Aaron Griffin (phrakture) - Friday, 08 December 2006, 23:07 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Since getting the latest pacman, running sortmirrors.pl doesn't sort the mirrors, but instead removes them!:

Take a look at these commands, as run on the default current repository with the latest pacman (2.9.6-2, I think):

root:pacman.d # sortmirrors.pl <current > current.new
:: PROCESSING [current]
Running netselect to choose 24 out of 27 addresses.

root:pacman.d # cat current.new
#
# CURRENT: Arch Linux core repository
#
[current]
# North America
# Europe
# Australia
# Asia
root:pacman.d #

Also, just wondering if there is a reason that the new /usr/bin/sortmirror's script uses a cp + rm command instead of a mv command?
This task depends upon

Closed by  Aaron Griffin (phrakture)
Thursday, 28 December 2006, 17:00 GMT
Reason for closing:  Implemented
Additional comments about closing:  rankmirrors in place of sortmirrors.pl - sortmirrors will (potentially) be removed in the future.
Comment by Judd Vinet (judd) - Thursday, 21 July 2005, 17:30 GMT
Sortmirrors.pl bug is fixed.

However, there's another gotcha that hasn't been dealt with. netselect doesn't play well with hosts that have multiple A records in their DNS zones. ftp.archlinux.org is one of these hosts. So running sortmirrors.pl on Current will result in a netselect-sorted file afterwards, but it will exclude the ftp.archlinux.org entirely.

This will require an upstream patch to fix.
Comment by Judd Vinet (judd) - Thursday, 21 July 2005, 17:52 GMT
Hmm... scratch that. I didn't fix the sortmirrors bug. :)

Turns out it's netselect's fault. On my laptop, netselect doesn't do its job and gives back no servers. On two other boxes, it works fine.

Sorry, not much I can do here, unless we find a better tool than netselect.
Comment by Lone_Wolf (Lone_Wolf) - Monday, 21 November 2005, 21:54 GMT
I had the same problem today, and found it was due to my firewall configuration.
I had blocked most of the icmp services, and it looks like netselect couldn't get a valid response from the servers and thus removed them.
after allowing icmp and restoring the original mirror files from abs, sortmirrors / netselect worked like normal again.

(also posted on arch forum)
Comment by Johannes Jordan (FoPref) - Monday, 20 February 2006, 01:06 GMT
I also filed a similiar bug report:
http://bugs.archlinux.org/task/3654

A few days ago I setup another machine on a different location (behind a firewall) and again got all mirror entrys deleted. So I just wanted to check back and ask for fixing this issue. I wonder, if it happens twice to me, how many other unsuspicious people can get into that trouble?

If it's due to netselect or not, there are systems even without any ICMP getting out of their firewall, but I doubt every user knows he needs ICMP for this... so in my humble opinion it should be part of the script to check back if there is *any* mirror left in the newly created file or not...
Or even better: show the user the results and let him decide wether to use the new mirror list or the old one.
Comment by Dusty Phillips (Dusty) - Friday, 03 March 2006, 21:41 GMT
Hey Judd,

A user has posted a new python script that people seem to like better than netselect and sortmirrors... maybe you'd like to use it officially?

http://bbs.archlinux.org/viewtopic.php?t=19278&sid=475ab18a5d9b31952459fd9912d20d19

Dusty
Comment by Aaron Griffin (phrakture) - Friday, 08 December 2006, 23:07 GMT
rankmirrors is in pacman cvs. Does this seem like a suitable alternative to sortmirrors?

Loading...