RPM Community Forums

Mailing List Message of <rpm-users>

Re: upgrading from rpm 4.4 to rpm 5

From: Jeff Johnson <n3npq@mac.com>
Date: Sat 13 Dec 2008 - 14:40:32 CET
Message-id: <74315C46-71A1-4456-9712-AF393A880CAB@mac.com>

On Dec 13, 2008, at 2:50 AM, JD wrote:

> How do I safely upgrade from rpm 4.4 to rpm 5
> without destroying my current databse?
>
> On one system, the rpm database has become unusable
> after the upgrade.
> To wit:
> # rpm -qa
> rpmdb: Program version 4.3 doesn't match environment version
> error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH:  
> Database environment version mismatch
> error: cannot open Packages index using db3 -  (-30974)
> error: cannot open Packages database in /var/lib/rpm
>

There's a version stamp in /var/lib/rpm/__db* files that is
checked when a Berekeley DB dbenv is 1st opened.

Remove the version stamp by doing
	rm -f /var/lib/rpm/__db*
will remedy. Entirely safe on a quiescent system (which is most
usage cases for an rpmdb, rpm just doesn't run that often to worry).

> How do I recover from this??
>

BTW, rpm5 automates the removal action for the DB_VERSION_MISMATCH  
condition.
But that only solves the issue with rpm-4.4.x -> rpm5 upgrades, the  
reverse
downgrade requires rpm-4.4.x to handle DB_VERSION_MISMATCH  
automagically.

73 de Jeff

  • application/pkcs7-signature attachment: smime.p7s
Received on Sat Dec 13 15:41:31 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.