Hi all,
My system is FC2 with RPM version 4.3.1 (fully updated).
Yesterday when doing a couple of "yum list something*" queries I suddenly got the following error from yum:
Traceback (most recent call last): File "/usr/bin/yum", line 30, in ? yummain.main(sys.argv[1:]) File "/usr/share/yum/yummain.py", line 163, in main (log, errorlog, filelog, conf, cmds) = parseCmdArgs(args) File "/usr/share/yum/yummain.py", line 75, in parseCmdArgs conf=yumconf(configfile=yumconffile) File "/usr/share/yum/config.py", line 155, in __init__ self.yumvar['releasever'] = self._getsysver() File "/usr/share/yum/config.py", line 291, in _getsysver hdr = idx.next() StopIteration
After a little investigation I found out that this error was caused by a corrupt rpm-database. To correct this I ran "rpm --rebuilddb".
Now the rpm command does not give any errors, but unfortunately the rpm-database is now empty, e.g.:
[mnk@flanagan mnk]$ rpm -qa [mnk@flanagan mnk]$ db_dump /var/lib/rpm/Packages VERSION=3 format=bytevalue type=hash db_pagesize=4096 HEADER=END DATA=END [mnk@flanagan mnk]$
Yum still gives me the error shown above.
On Google I was able to find one similar incidence: http://www.redhat.com/archives/fedora-list/2004-June/msg00284.html
He was lucky/wise since he had a backup of the database ... I don't :-(
Now my questions are: - How could this happen in the first place - a bug in RPM? - Is there any way that I can recover the information I have lost?
/Mathias
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature