You are not logged in.

#1 2011-12-31 15:34:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

[solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

Allan had problems with his webhost: http://identi.ca/notice/87871795 After I have added

[allanbrokeit]
Server = http://allanmcrae.com/$repo/$arch

to my pacman.conf, I couldn't use update and install packages anymore:

[karol@black ~]$ pacman -Syu
warning: database file for 'allanbrokeit' does not exist
:: Synchronizing package databases...
 testing is up to date
 community-testing is up to date
 core is up to date
 extra is up to date
 community is up to date
error: failed retrieving file 'allanbrokeit.db' from allanmcrae.com : The requested URL returned error: 404
error: failed to update allanbrokeit (download library error)
:: Starting full system upgrade...
error: failed to prepare transaction (could not find database)
[karol@black ~]$ pacman -S hdparm
warning: database file for 'allanbrokeit' does not exist
error: failed to prepare transaction (could not find database)

hdparm is in [core]. pacman 3.5.4-4 throws a bunch of errors

error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'

but works and allows me to update and install stuff.

Is it a feature of pacman 4?


Allan's repo seems to be already back online, so you have to test it with some nonexistent repo & db.

Last edited by karol (2012-01-07 22:48:29)

Offline

#2 2011-12-31 15:43:48

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

There appears to be nothing wrong with pacman. It cannot download the database for that one repo, and it seems to error out on that. Try disabling the repo and see if that works?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2011-12-31 16:03:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

.:B:. wrote:

There appears to be nothing wrong with pacman. It cannot download the database for that one repo, and it seems to error out on that. Try disabling the repo and see if that works?

Yes, commenting out the repo works, the error messages are clear enough.
Still, pacman 3 works w/o commenting the repo out and I'm curious why pacman 4 does not.

Offline

#4 2011-12-31 16:42:46

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

Maybe file a bug report? tongue


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2011-12-31 16:50:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

I thought somebody here will enlighten me if it's really a bug, a feature or user error ;P

Offline

#6 2011-12-31 17:10:18

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

Smells like defective by design... Just because one repo is out of order doesn't mean the others couldn't be working.

Last edited by .:B:. (2012-01-01 04:04:12)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2012-01-01 00:57:56

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

Wow - my website got fixed!

Anyway... I think this was a "feature".  Pacman initializes itself fully (including databases) before doing anything, that way all databases are checked for valid signatures.  If that fails for any reason, then pacman quits.   

Imagine that my repo was called "security" and all security updates went there.  Then an attack could be caused by disabling that repo somehow.   Good example...   Not sure.   Maybe bring this up on pacman-dev.

Offline

#8 2012-01-02 11:02:28

ChALkeR
Member
Registered: 2010-10-27
Posts: 63

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

Allan, you could ask the user if he wants to continue with some repos disabled.
Or, you could make it a configuration option: Continue|Abort|Ask.
Ask should probably fallback to Abort if asking is not possible (libalpm? packagekit?).

Offline

#9 2012-01-06 04:25:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

Offline

#10 2012-01-07 22:48:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

Dan responded to my e-mail:

Dan McGee wrote:

Yes, this was mostly an intended change.

Note that you can do an -R operation (or anything not requiring sync databases) just fine. However, once we hit any machinery that requires sync databases to be present, we require all configured ones are accounted for. This is for a few reasons:
1) dependency resolving if you have 1 out-of-date database and 4 up-to-date ones, things can get ugly or messed up.
2) integrity- if you insist on a database being signed, we'd rather not proceed with nothing.
3) replay attacks- what you don't fully see in the above situation is we also validate the signature on the database at load time; if that were to fail we'd also bail out. This is so pacman is capable of verifying the expiration time on a database signature; it makes sense to only allow database signatures to be valid for a week at a time so people know they have out-of-date repo metadata.


Closing.

Offline

Board footer

Powered by FluxBB