Red Hat Bugzilla – Bug 105395
rpm database is missing packages that *are* installed
Last modified: 2007-04-18 12:57:49 EDT
Description of problem:
rpm -qa does not list all the packages that are installed
Version-Release number of selected component (if applicable):
rpm -qa, then inspect and look for common things that I *know* are installed,
Steps to Reproduce:
1. rpm -qa | grep gzip
2. ls /bin/gizp
gzip is not in the package list, but is installed
gzip (as well as many other packages) should be reported with rpm -qa
This is the latest step in my continuing saga of recovering from a corrupt rpm
If corrupt, then yes, installed headers (but not files) are
Look at "rpm -Va --nofiles output".
Missing dependencies can be looked up with "rpm -q --redhatprovides"
if rpmdb-redhat is installed.
Unowned files can be detected by examining, say,
rpm -qf *
Does that help?
When I manually copied the rpm-4.1.x files into place using the cpio business to
fix my corrupt database earlier this week, I managed to get a full listing of
all ~500 packages that were installed. When I put the rpm-4.0.4 packages back,
and rebuilt the database to fit with the db3 version that I had (to get some
hash formats fixed), the rpm database was reduced to ~100 packages--the extra
headers just disappeared.
Back and forth I could go. Use the rpm-4.1.x tools to rebuild and my database
is fine; back to 4.0.4 and it's missing packages. Really weird stuff. I could
not install the rpm-4.1.x packages because of dependencies on my RH7.2 system
without going hog-wild on upgrading everything. I really wanted to get a
workable rpm-4.0.4/rh7.2 system.
Finally, I used the list of installed packages from when I had the rpm-4.1.x
tools copied in place to diff against the output of rpm-4.0.4 -qa and manually
added each package header (--nofiles) until they were all there.
I then upgraded to RH7.3 based on your earlier suggestion, and I guess all my
packages are sorted out for now.