Good Shiva! What a massive pain.  Might you consider producing a perl script 
that would handle all the steps you mentioned as a last-ditch rpm db recovery 
tool?  I have lost my rpm db a few times but always got it back with the 
rebuilddb command but I can say I would HATE to have to go through all the 
steps you mentioned to get the db back if the normal procedure fails.

praedor

On Wednesday 04 December 2002 01:44 pm, Luca Olivetti wrote:
> Alan Carbutt wrote:
> > I was updating the latest errata for LM 9.0 and I got the following
> > output:
> >
> > [root@x errata]# rpm -Fvh *
> > rpmdb: Unreferenced page 3479
> > rpmdb: Unreferenced page 3480
[...]
> It happens to me all the time.
> Delete /var/lib/rpm/__db.* and then rpm --rebuilddb
>
> If you're lucky you'll get your rpm database back.
> If you're not, you'll get a working rpm database but with *many*
> packages missing (this happened to me once). It was painful to solve
> (basically, running all files through rpm -qf to see which ones weren't
> owned by any package, run the resulting list through urpmf to know the
> packages to rpm --justdb).
> Now each time I install or remove packages I keep a copy of the rpm -qa
> output (to compare it to what I get after rpm --rebuilddb).
>
> Bye

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to