Bug 6915 - rpm needs tools to repair damaged databases
rpm needs tools to repair damaged databases
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.1
All Linux
high Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-11-10 23:31 EST by Chris Siebenmann
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-11-16 11:00:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Siebenmann 1999-11-10 23:31:30 EST
As a result of an intaller problem (see bug #6914), we
wound up with a Redhat 6.1 system where the RPM database
thought that a number of RPMs were installed twice (and
when I say 'installed twice', I don't mean with seperate
version numbers; I mean with identical version numbers
and everything).

 It was remarkably hard and tedious to deal with the
situation, because:
- rpm --rebuilddb did nothing to clean up the duplicates
- you cannot 'rpm -e' them; rpm reports that your attempt
  to remove them matches more than one thing.
- rpm -Uvh --replacepkgs on such a duplicated RPM does not
  stamp out the duplication (although at least it doesn't
  make it worse)
- there are no other good tools for dealing with this in
  the rpm arsenal that are obvious.

 To deal with this, we had to go through the tedious
step of forcefully downgrading each RPM to the 6.0 version
(which purged both entries, since they were from 6.1), and
then upgrading it to the 6.1 version again. All just to
play with the database.

 Rpm databases do become damaged from time to time. I think
that rpm badly needs a better set of tools to deal with
this than 'rpm --rebuilddb' (especially when it only deals
with some things, and does nothing about others).
Comment 1 Jeff Johnson 1999-11-16 11:00:59 EST
Rpm already has such tools:

1) Removing all occurences of a package (e.g. foo) in the database (no files
deleted):
	rpm -e --allmatches --justdb foo

2) Adding just the header for a package to the database (no files added):
	rpm -i --justdb foo*.rpm

In practice, using the tools is often more complicated than reinstalling
everything.

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