Bug 6915 - rpm needs tools to repair damaged databases
Summary: rpm needs tools to repair damaged databases
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.1
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-11-11 04:31 UTC by Chris Siebenmann
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-11-16 16:00:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Chris Siebenmann 1999-11-11 04:31:30 UTC
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 16:00:59 UTC
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.