repairing damaged rpm
From: Jim (jimo_at_eskimo.com)
Date: 2 Mar 2005 22:24:39 GMT
I made the mistake of installing the kernel sources as root from the
SuSE 9.2 distro CD, and now my rpm 3.0.6 is broken. Specifically,
when using it to try to install anything, the files in the package
are said to be missing. I've got the rpm-3.0.6 sources from the SuSE
7.3 distro CD, and I can probably compile it up by hand and install
it without using rpm, but I'd like to ask if anyone has been through
this before and can suggest an easier shortcut. I hate to wipe out
my entire rpm installation, database, etc., if I can avoid it.
Of course, I can save off all the components and re-introduce them
one-by-one after rebuilding rpm, but what order of re-introduction
would make sense?
FWIW, here's a typical output from rpm -Vvv -p somepackage.rpm:
Do those lines starting with "S" point to the problem?
The error from rpm -i somepackage.rpm says:
unpacking of archive failed on file blah-blah: cpio: read
that is, it fails on the first missing file and quits with the cpio:
read error. As far as I can tell, cpio hasn't been touched, but when
I try to get the contents of an rpm with rpm2cpio, then extract the
result with cpio, cpio says all the files are missing, even though
the archive is 4Megs in size. Presumably, rpm2cpio is broken.
FWIW, I'm still running SuSE 7.3, and have been trying to install
SuSE 9.2 since New Years. Now I'd just like to have rpm back.
The rpm on the 9.2 CD seems to be 4.1.1.
TIA for any suggestions,