Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 194291 - rpmdb error during post-install script
rpmdb error during post-install script
Product: Fedora
Classification: Fedora
Component: kadischi (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chitlesh GOORAH
Fedora Extras Quality Assurance
: EasyFix, Patch
Depends On:
  Show dependency treegraph
Reported: 2006-06-06 17:40 EDT by Orion Poplawski
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-06-18 11:33:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2006-06-06 17:40:58 EDT
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...
In progress...
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

How reproducible:
every time

I think this has to do with using different rpm versions, perhaps in and out of
a chroot.
Comment 1 Orion Poplawski 2006-06-06 18:11:31 EDT
This should fix it:

cvs diff -u lib/functions.py
Index: 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"""
Comment 2 Jasper O. Hartline 2006-06-15 18:34:36 EDT
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?
Comment 3 Jasper O. Hartline 2006-06-18 11:32:29 EDT
Committed to CVS.

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