Bug 40185 - rpm is unusable
rpm is unusable
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-10 22:00 EDT by john barker
Modified: 2008-08-01 12:22 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-10 23:53:17 EDT
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 john barker 2001-05-10 22:00:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
I was attempting to upgrade my rpm package and downloaded the latest rpm
release from rpmfind.

The new version was rpm-4.0.3-0.9.6x.i386.rpm and I believe the old was
release 3.something from the stock RH6.2 cd, the upgrade appeared to work 
(I
was using Webmin.85 to install remotely) but now when I try to install
another package I get the following error.

error: cannot open Packages database in /var/lib/rpm

I tried rpm rebuilddb (can't read package index) with no luck. I have the 
files
in /var/lib/rpm but I now know that I should have upgraded to db3 and 
upgraded popt before installing the new rpm.  I need to know how to get 
back to a baseline so I can use rpm in the future.

How reproducible:
Didn't try


Additional info:

RPM version 4.0.3
Copyright (C) 1998-2000 - Red Hat, Inc.
Comment 1 Jeff Johnson 2001-05-10 22:25:08 EDT
You will need to get a copy of rpm-4.0.2-6x and install manually:

	1) Get all (rpm, rpm-devel, rpm-build, rpm-python, popt) packages
	for rpm-4.0.2-6x into a directory (e.g. /var/tmp/xxx).

	2) Unpack using rpm2cpio:

		cd /var/tmp/xxx
		rpm2cpio rpm-4.0.2-6x.i386.rpm | cpio -dim
	
	3) Install using the unpacked executable

		./bin/rpm -Uvv --oldpackage {rpm,popt}-*

	4) Immediately rebuild you database to convert from db1 to db3:

		rpm --rebuilddb -vv

FWIW, rpm-4.0.3 is a development release at the moment, there is little
joy running buggy code.
		
Comment 2 john barker 2001-05-10 23:12:53 EDT
jbj,

I followed all the steps above with great success until #4.  Here is what the 
rebuild says:

rpm  --rebuilddb -vv
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.11195
D: creating directory /var/lib/rpmrebuilddb.11195
D: opening old database with dbapi 1
D: opening db index       /var/lib/rpm/Packages rdonly mode=0x0
D: closed  db index       /var/lib/rpm/Packages
error: cannot open Packages index
D: removing directory /var/lib/rpmrebuilddb.11195
Comment 3 Jeff Johnson 2001-05-10 23:53:12 EDT
Make sure you are using the rpm-4.0.2 executable. Copy the unpacked
/var/tmp/xxx tree onto your file system if necessary.
Comment 4 john barker 2001-05-10 23:55:14 EDT
I found the problem.
I was using the old executable for step 4.
I used rpm  --rebuilddb -vv  instead of ./bin/rpm  --rebuilddb -vv from the
/var/tmp/xxx location.

Thanks for your assistance


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