FS#21156 - [devtools] mkarchroot not getting server from mirrorlist

Attached to Project: Arch Linux
Opened by Kevin Piche (kpiche) - Saturday, 09 October 2010, 04:24 GMT
Last edited by Pierre Schmitz (Pierre) - Sunday, 24 October 2010, 09:04 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Noticed mkarchroot was always using server mirrors.kernel.org which is not the preferred server. The grep in mkarchroot pulls the first non-comment out of mirrorlist which happens to be a blank line on my system. I fixed it by changing (line 76):

grep -v '^#' -m1 /etc/pacman.d/mirrorlist
grep '^\s*Server' -m1 /etc/pacman.d/mirrorlist

Additional info:
* devtools 0.9.10-1

Steps to reproduce:
1. Don't have mirrors.kernel.org as the first server
2. Create/update a chroot and watch it download from mirrors.kernel.org
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Sunday, 24 October 2010, 09:04 GMT
Reason for closing:  Fixed
Comment by Kevin Piche (kpiche) - Saturday, 09 October 2010, 04:48 GMT
You could replace it all with sed too:
host_mirror=$(sed -n '/^Server/ {s#/os/(i686|x86_64)#/os/\$arch#g; p; q}' /etc/pacman.d/mirrorlist)
Comment by Pierre Schmitz (Pierre) - Saturday, 09 October 2010, 06:50 GMT
That is fixed a way better in git: http://projects.archlinux.org/devtools.git/commit/?id=db7a90ccd280a84bdbdef078ed766aa321ed317a

I just need to release a new version :-)
Comment by Kevin Piche (kpiche) - Sunday, 10 October 2010, 02:25 GMT
Excellent! Feel free to close.

Loading...