yum db lossage

Paul Howarth paul at city-fan.org
Mon Jul 10 14:22:55 UTC 2006


Wolfgang S. Rupprecht wrote:
> Paul Howarth <paul at city-fan.org> writes:
>> Wolfgang S. Rupprecht wrote:
>>> 	/bin/rm -f /var/lib/rpm/__db.*
>>> 	rpm --initdb
>>> 	rpm --rebuilddb
>>>         chown rpm:rpm /var/lib/rpm/__db.*
>> Is your fedora-release package still OK?
>>
>> $ rpm -qi fedora-release
> 
>      [root at arbol ~]# rpm -qi fedora-release
>      package fedora-release is not installed
> 
> How do I recreate that?

# rpm -Uvh --replacefiles --replacepkgs \
http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/fedora-release-5-5.noarch.rpm

> Is there any other data I need to initialize
> the database with?
> 
> BTW. "yum -C list" does show 5736 lines of packages, 661 marked as
> installed.  The "rpm --rebuild" did pick up the information from the
> real packages.

How many packages does this list:
$ rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n"

You could cross-reference that with your yum output and check for 
discrepancies.

You could then reinstall (possibly using rpm's --justdb option as 
suggested earlier in this thread) any missing packages.

>   [root at arbol ~]# yum -C list 
>   Loading "installonlyn" plugin
>   Setting up repositories
>   Reading repository metadata in from local files
>   Installed Packages
>   ImageMagick.i386                         6.2.5.4-4.2.1.fc5.3    installed       
>   ImageMagick.x86_64                       6.2.5.4-4.2.1.fc5.3    installed       
>   MAKEDEV.x86_64                           3.21-3                 installed       
>   NetworkManager-glib.x86_64               0.6.3-1.fc5            installed       
>   ORBit2.x86_64                            2.14.0-1               installed       
>   PyXML.x86_64                             0.8.4-3.2.2            installed       
> 
> Just For the record, and the most disconcerting part, was that nothing
> out of the ordinary happened just before the yum db trashed itself.  I
> had just finined a "yum update" "shutdown -r now" and after they
> machine rebooted I tried to do a "yum list > yum-list.txt" so I would
> have a snapshot of what I had installed and what was available.
> 
> Does the db use a server that might have been updating the db file
> when I rebooted?

Not that I can think of. Could conceivably be a hardware issue.

Paul.




More information about the fedora-list mailing list