Bug 11361 - rpm can't read database after upgrade
Summary: rpm can't read database after upgrade
Keywords:
Status: CLOSED DUPLICATE of bug 10775
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-05-11 09:53 UTC by Jonathan Kamens
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-05-11 12:06:01 UTC
Embargoed:


Attachments (Terms of Use)

Description Jonathan Kamens 2000-05-11 09:53:21 UTC
I had rpm-3.0.4-0.48 and rpm-build-3.0.4-0.48 installed.  I "upgraded" to
rpm-3.1-0.9 and rpm-build-3.1-0.9.  When I attempted to view the database,
rpm claimed that it couldn't see several files that are in fact present in
/var/lib/rpm and then it segfaulted.

Comment 1 SB 2000-05-11 11:37:59 UTC
I had the same exact problem, and so have other people.  That version of rpm
appears to use a different rpmdb (db x.x) version than previous  version and
lacks support for the older db formats including db 2.x version 5.  I have been
unable in trying to get it to work properly and the only workaround I can see is
to reinstall an older version of RPM.  If you are unable to use rpm completely
and have no backup of the rpm binary you can do the following:

1) download or obtain a copy of rpm (version 3.1-0.3 or 3.04-7) and save it to /
tmp
2) convert the rpm to a cpio archive by doing this:  rpm2cpio rpm-3.1-
0.3.i386.rpm > rpm-3.1-0.3.i386.rpm.cpio
3) extract the the files from the archive by doing this: cpio -i --make-
directories --preserve-modification-time --file=rpm-3.1-0.3.i386.rpm.cpio
that will create the directories where the package's file are created.
4) By hand move the file from the /tmp/usr directories to the /usr directory
equivilants and do the same with /tmp/bin/rpm which should be moved to /bin/rpm.
5) After those steps are complete and you moved all the files to the proper place
your rpm should be working again.

As of right now I'm not aware of any way to convert the rpmdb's prior to 2.1-0.x
to the new format used in rpm-3.1-0.9 so reinstalling that package in to see if
it does it again will be a fruitless attempt as it will fail again. Just thought
I'd warn you.

Hope that helped,

Stan Bubrouski

Comment 2 Jeff Johnson 2000-05-11 12:06:59 UTC
*** This bug has been marked as a duplicate of 10775 ***


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