Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#19782 - Only first entry used in mirrorlist for pacman -Sy

Attached to Project: Pacman
Opened by Jared Henley (multixrulz) - Sunday, 13 June 2010, 04:06 GMT
Last edited by Dan McGee (toofishes) - Monday, 16 August 2010, 11:02 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version 3.3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

When pacman downloads the package database, it only seems to use the first entry from /etc/pacman.d/mirrorlist instead of failing over to other severs when the first server entry fails.

Additional info:
* package version(s)
pacman 3.3.5-5

Steps to reproduce:

I have two archlinux systems. One (the master) makes /var/cache/pacman/pkg available by ftp. The slave lists the master as the first mirror. The compressed package database files are therefore not available via ftp from my master machine.

When running "pacman -Syu" on the slave, the package database is not downloaded and pacman reports everything as up to date. When I comment out the line in /etc/pacman.d/mirrorlist that lists my master machine, pacman -Sy will download the package database from a mirror on the internet as expected, and report than packages need to be upgraded.
This task depends upon

Closed by  Dan McGee (toofishes)
Monday, 16 August 2010, 11:02 GMT
Reason for closing:  Fixed
Additional comments about closing:  Reporter notes it is fixed in newer version
Comment by Dan McGee (toofishes) - Thursday, 17 June 2010, 05:17 GMT
Works just fine here; I'm not sure what you are seeing. You most definitely have databases available if you aren't seeing the "Not Found" message below.

$ sudo pacman -Sy
:: Synchronizing package databases...
testing is up to date
error: failed retrieving file 'core.db.tar.gz' from localhost : Not Found
core is up to date
error: failed retrieving file 'extra.db.tar.gz' from localhost : Not Found
extra 451.8K 122.5K/s 00:00:04 [############################################################] 100%
error: failed retrieving file 'community-testing.db.tar.gz' from localhost : Not Found
community-testing is up to date
error: failed retrieving file 'community.db.tar.gz' from localhost : Not Found
community is up to date
Comment by Jared Henley (multixrulz) - Thursday, 17 June 2010, 10:24 GMT
It looks to me like you've added a server line to localhost where no FTP server is running (ie a Connection Refused error). I have an FTP server running, but the database files are not available there (ie a File Not Found error).

Is there anything else I can provide to give a clue?

Below are actual mirrorlist files and pacman -Sy runs.

Head of /etc/pacman.d/mirrorlist, all remaining mirrors are commented

#
# Arch Linux repository mirrorlist
# Generated on 2009-12-06
#

Server = ftp://mediapc

# Any
#Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686
#Server = http://mirrors.kernel.org/archlinux/$repo/os/i686

# Australia
#Server = ftp://mirror.aarnet.edu.au/pub/archlinux/$repo/os/i686
#Server = http://mirror.aarnet.edu.au/pub/archlinux/$repo/os/i686
#Server = ftp://ftp.iinet.net.au/pub/archlinux/$repo/os/i686
#Server = http://ftp.iinet.net.au/pub/archlinux/$repo/os/i686
Server = ftp://mirror.internode.on.net/pub/archlinux/$repo/os/i686
#Server = http://mirror.internode.on.net/pub/archlinux/$repo/os/i686
#Server = ftp://ftp.netspace.net.au/pub/archlinux/$repo/os/i686
#Server = http://ftp.netspace.net.au/pub/archlinux/$repo/os/i686
#Server = ftp://mirror.optus.net/archlinux/$repo/os/i686
Server = http://mirror.optus.net/archlinux/$repo/os/i686
#Server = ftp://mirror.pacific.net.au/linux/archlinux/$repo/os/i686
#Server = http://mirror.pacific.net.au/linux/archlinux/$repo/os/i686

# pacman -Sy
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date

**** Edit /etc/pacman.d/mirrorlist to the following (commenting out the local server line)

#
# Arch Linux repository mirrorlist
# Generated on 2009-12-06
#

#Server = ftp://mediapc

# Any
#Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686
#Server = http://mirrors.kernel.org/archlinux/$repo/os/i686

# Australia
#Server = ftp://mirror.aarnet.edu.au/pub/archlinux/$repo/os/i686
#Server = http://mirror.aarnet.edu.au/pub/archlinux/$repo/os/i686
#Server = ftp://ftp.iinet.net.au/pub/archlinux/$repo/os/i686
#Server = http://ftp.iinet.net.au/pub/archlinux/$repo/os/i686
Server = ftp://mirror.internode.on.net/pub/archlinux/$repo/os/i686
#Server = http://mirror.internode.on.net/pub/archlinux/$repo/os/i686
#Server = ftp://ftp.netspace.net.au/pub/archlinux/$repo/os/i686
#Server = http://ftp.netspace.net.au/pub/archlinux/$repo/os/i686
#Server = ftp://mirror.optus.net/archlinux/$repo/os/i686
Server = http://mirror.optus.net/archlinux/$repo/os/i686
#Server = ftp://mirror.pacific.net.au/linux/archlinux/$repo/os/i686
#Server = http://mirror.pacific.net.au/linux/archlinux/$repo/os/i686

# pacman -Sy
:: Synchronizing package databases...
core 36.1K 5.7K/s 00:00:06 [#####################] 100%
extra 454.6K 29.5K/s 00:00:15 [#####################] 100%
community 364.3K 20.6K/s 00:00:18 [#####################] 100%
Comment by Dan McGee (toofishes) - Thursday, 17 June 2010, 12:12 GMT
No, I stated *exactly* what I had running- my local proxy script where the file was not available. This is what it looks like if nothing is running:

$ pacSy
:: Synchronizing package databases...
testing is up to date
error: failed retrieving file 'core.db.tar.gz' from localhost : Connection refused
core is up to date

I am using HTTP, and I do have a path rather than just a hostname. I wonder if something with FTP is weird here.
Two things that might be helpful:
1. wget ftp://mediapc/core.db.tar.gz
2. Comment out all repos besides [core], enable your local server and just one other mirror, and then save the output of pacman -Sy --debug. Please attach it so the output doesn't make this bug report unreadable.
Comment by Jared Henley (multixrulz) - Friday, 18 June 2010, 00:05 GMT
Output of the tests attached. Sorrry for the mess previously.
Comment by Dan McGee (toofishes) - Sunday, 20 June 2010, 20:37 GMT
I just cannot reproduce this error. I'm not sure where to go from here, other than maybe some logs on your FTP server side when doing this -Sy operation? It falls back every time for me, and this is with a ftp server running now.

$ sudo ./src/pacman/pacman -Sy
:: Synchronizing package databases...
testing 16.7K 80.7K/s 00:00:00 [############################################################] 100%
error: failed retrieving file 'core.db.tar.gz' from dublin : File unavailable (e.g., file not found, no access)
core 36.2K 88.8K/s 00:00:00 [############################################################] 100%
error: failed retrieving file 'extra.db.tar.gz' from dublin : File unavailable (e.g., file not found, no access)
extra 451.9K 127.2K/s 00:00:04 [############################################################] 100%
error: failed retrieving file 'community-testing.db.tar.gz' from dublin : File unavailable (e.g., file not found, no access)
community-testing is up to date
error: failed retrieving file 'community.db.tar.gz' from dublin : File unavailable (e.g., file not found, no access)
community 372.8K 111.4K/s 00:00:03 [############################################################] 100%

Comment by Jared Henley (multixrulz) - Sunday, 20 June 2010, 23:10 GMT
Weird. FTP log doesn't show anything interesting. It's probably not worth spending any more time on this one, as it's not a big deal. I had strange behaviour from mc at one time (nothing about it on the internet) that resolved itself after enough upgrades, maybe this will do the same.
Comment by Jared Henley (multixrulz) - Monday, 16 August 2010, 10:35 GMT
This problem has resolved itself as of pacman-3.4.0-2.

Loading...