You are not logged in.

#1 2009-07-23 14:36:24

bnolsen
Member
Registered: 2008-12-10
Posts: 64

corrupt pacman database?

I ran an Syu upgrade this morning.
Supposed to install 60 packages.
However after download and during install I got the readline library error which resulted in only 15 packages getting installed.
Also the system was unbootable.

Anyways, I booted into a memory stick and the system thinks all 60 packages were installed (and they definitely weren't).
I'm having other problems but it seems using the "force" option is taking care of them.

Any way I can get my local pacman database back in sync so those other 45 packages will actually install??

This is the second time i've seen this happen (been runnig arch on a laptop for 9 months now).

Last edited by bnolsen (2009-07-23 14:37:07)

Offline

#2 2009-07-23 19:35:25

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: corrupt pacman database?

It's the most common error that occured recently by the users, just a simple pacman -Syu after the pacman -Syu which caused the problem.

Please use the force option in last case only. Do you have any backup from your system ?

Offline

#3 2009-07-23 22:04:50

bnolsen
Member
Registered: 2008-12-10
Posts: 64

Re: corrupt pacman database?

No backup of the system.  It won't kill me to reinstall but that's a huge PITA I shouldn't have to deal with.

Apparnetly the Arch package system is NOT transactional or else this situation wouldn't come up.

Offline

#4 2009-07-23 22:41:14

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: corrupt pacman database?

There is no such thing as a "pacman database".  Pacman uses a bunch of text files in directories (see "/var/lib/pacman/local/").  Even the lock is just a file*.  This has a number of advantages and disadvantages.  I find that Arch is by far the easiest distro for meta manipulation of packages, because all the traditional text processing and version control tools work great.  But as you've found, pacman's internal consistency is only as good as the underlying file system.

Write a little script that will do "pacman -Rd ..." and "pacman -S ..." for each app.  The downside to this is that each will be set as "explicitly installed", so use "pacman -S --asdeps ..." for the non-toplevel packages.  I do not care about --asdeps status, because I always use -Rssc when removing packages, and this ignores the status flag normally analyzed when using plain -R.

* Looks like a duck, quacks like a duck.  It is a database, and there are many times when flat file DBs are the best choice.  I've long been an advocate of them, if you have one writer and many readers.  Or because it seems silly to have complex adhoc userland database caching schemes when the OS provides file caching for free, in the kernel.  However, whether or not it is transactional is entirely based on your choice of file system.

What file system are you running?  You might want to switch to something which better matches your requirements.

Offline

#5 2009-07-24 17:54:46

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: corrupt pacman database?

^^
this is such a thing as a pacman database if you have caged your pacman with pacman-cage

Offline

#6 2009-07-25 14:38:22

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: corrupt pacman database?

And please keep backup from your system, we try to help you forever smile)) But it's a very basic operation in computer world.

Offline

#7 2009-07-27 15:54:56

bnolsen
Member
Registered: 2008-12-10
Posts: 64

Re: corrupt pacman database?

The backup is to rebuild the system.
I've been running gentoo on higher powered systems now for more than 8 years.  I've had it go unbootable probably twice in those years.  I was curious as to why arch seems less stable.

I did finally get the system back up and running.  Booted from a memory stick and used pacman -r option.  The Syu option printed out a ton of debug about what package directories were screwed up and I just reinstalled all of those packages with the force option.

I'm running ext2 on this system.  It's a netbook with an SSD drive.

Offline

#8 2009-07-31 21:41:08

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: corrupt pacman database?

Hello bnolsen!

Why don't you choose gentoo if it's better for you, i can't understand really, you won't get sympathy with such a distribution comment here.

Offline

Board footer

Powered by FluxBB