Description of problem: rpm -qa does not list all the packages that are installed Version-Release number of selected component (if applicable): rpm-4.0.4-7x How reproducible: rpm -qa, then inspect and look for common things that I *know* are installed, like gzip Steps to Reproduce: 1. rpm -qa | grep gzip 2. ls /bin/gizp 3. Actual results: gzip is not in the package list, but is installed Expected results: gzip (as well as many other packages) should be reported with rpm -qa Additional info: This is the latest step in my continuing saga of recovering from a corrupt rpm database.
If corrupt, then yes, installed headers (but not files) are missing. 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, cd /bin rpm -qf * output. 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.