Bug 105395 - rpm database is missing packages that *are* installed
Summary: rpm database is missing packages that *are* installed
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-09-25 17:25 UTC by Brendan Miller
Modified: 2007-04-18 16:57 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-09-27 01:35:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Brendan Miller 2003-09-25 17:25:14 UTC
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.

Comment 1 Jeff Johnson 2003-09-27 01:15:57 UTC
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?

Comment 2 Brendan Miller 2003-09-27 01:35:50 UTC
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.