Bug 105395 - rpm database is missing packages that *are* installed
rpm database is missing packages that *are* installed
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-09-25 13:25 EDT by Brendan Miller
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-26 21:35:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Brendan Miller 2003-09-25 13:25:14 EDT
Description of problem:
rpm -qa does not list all the packages that are installed

Version-Release number of selected component (if applicable):

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
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
Comment 1 Jeff Johnson 2003-09-26 21:15:57 EDT
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,
    cd /bin
    rpm -qf *

Does that help?
Comment 2 Brendan Miller 2003-09-26 21:35:50 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.