Red Hat Bugzilla – Bug 194291
rpmdb error during post-install script
Last modified: 2007-11-30 17:11:34 EST
Description of problem:
With latest cvs source on FC5 x86_64:
Installing xorg-x11-drivers-7.0-2... Done [920/920]
Performing post install configuration...
Running post-install scripts
*** anaconda has finished the job ***
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 /scratch/livecd-build_no7/system/var/lib/rpm
Traceback (most recent call last):
File "/usr/local/share/kadischi/kadischi.py", line 216, in ?
kernel_version = get_kernel_version (sysdir)
File "/usr/local/share/kadischi/lib/functions.py", line 75, in get_kernel_version
for mi in ts.dbMatch ('name', 'kernel-xen0'):
TypeError: rpmdb open failed
I think this has to do with using different rpm versions, perhaps in and out of
This should fix it:
cvs diff -u lib/functions.py
RCS file: /cvs/devel/kadischi/lib/functions.py,v
retrieving revision 1.7
diff -u -r1.7 functions.py
--- lib/functions.py 11 Apr 2006 16:16:26 -0000 1.7
+++ lib/functions.py 6 Jun 2006 22:14:41 -0000
@@ -47,9 +47,9 @@
def rmpath (p):
try: os.remove (p)
except OSError: pass
- rmpath (normalize_path ('var/lib/rpm/__db.001', rootdir))
- rmpath (normalize_path ('var/lib/rpm/__db.002', rootdir))
- rmpath (normalize_path ('var/lib/rpm/__db.003', rootdir))
+ rmpath (normalize_path (['var/lib/rpm/__db.001'], rootdir))
+ rmpath (normalize_path (['var/lib/rpm/__db.002'], rootdir))
+ rmpath (normalize_path (['var/lib/rpm/__db.003'], rootdir))
def check_installed_rpms (rootdir, required_rpms, clear_db = True):
"""Sanity check the target system for required RPMs"""
I do not have the hardware to test this error, for 64 bit machines.
Can you explain a bit more about your build environment for Kadischi and what
environment it is running in, along with the arch of the repository you are using?
Does the patch you provided appear to solve the problem for sure?
Committed to CVS.