Bug 8752

Summary: rpm-3.0.4-0.33.i386.rpm --rebuilddb corrupts database
Product: [Retired] Red Hat Raw Hide Reporter: dunwoody
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-24 17:03:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dunwoody 2000-01-22 23:53:37 UTC
I installed rpm-3.0.4-0.33.i386.rpm and ran rpm --rebuilddb, and
got the following messages:

    c130441-j:lib!> rpm --rebuilddb
    temporary database /var/lib/rpm already exists
    error creating directory /var/lib/rpm: File exists

Instead of creating a temp dir and rebuilding the database, rpm
apparently added to the existing database in /var/lib/rpm, resulting
in duplicates of everything in the database.  There may be a trivially
easy way to de-corrupt the database, but if so I don't know what
it is.

I backed off to rpm-3.0.4-0.31.i386.rpm and copied a good
/var/lib/rpm from another system, and the problem went away --
rpm --rebuilddb works fine again.

All of the rpms on the system exhibiting the problem were current
with the latest RawHide rpms as of Sat 2000/01/22 1200 PST.

Comment 1 Jeff Johnson 2000-01-23 23:11:59 UTC
Comment out the line in /usr/lib/rpm/macros that looks like
	%_rebuilddbpath         %{_dbpath}
This will be fixed in rpm-3.0.4-0.34.

Comment 2 Jeff Johnson 2000-01-24 17:03:59 UTC
Now fixed in rpm-3.0.4-0.34 from Raw Hide.

Comment 3 Eddy Cooper 2000-01-30 19:29:59 UTC
Is there a way to fix a database that was corrupted by already?  My database is
like 60 megs and has multiple copies of every package I've installed.  I'd like
to keep my current database cause I've installed quite a few things since the
problems started....

Comment 4 Jeff Johnson 2000-01-31 16:03:59 UTC
*** Bug 8993 has been marked as a duplicate of this bug. ***