Bug 194291 - rpmdb error during post-install script
Summary: rpmdb error during post-install script
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kadischi   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Chitlesh GOORAH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: EasyFix, Patch
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-06 21:40 UTC by Orion Poplawski
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Orion Poplawski 2006-06-06 21:40:58 UTC
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 22:11:31 UTC
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 22:34:36 UTC
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 15:32:29 UTC
Committed to CVS.


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