Bug 496961
Summary: | Unable to install packages in %post - cannot open Packages database in /var/lib/rpm | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | James Laska <jlaska> | ||||||||
Component: | anaconda | Assignee: | Jeremy Katz <katzj> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | low | ||||||||||
Version: | 11 | CC: | bpeck, c.shoemaker, iand, jturner, kvolny, pjones, pmatilai, rmaximo, sameer, vanmeeuwen+fedora, wwoods | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2009-07-21 18:31:30 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
James Laska
2009-04-21 20:11:40 UTC
Can you strace rpm -qa after you chroot and attach the results to this bug too? Thanks. Also, see if 'rm -f /var/lib/rpm/__db*' before trying to install the snake package helps Created attachment 340656 [details]
strace rpm -q kernel
(In reply to comment #2) > Also, see if 'rm -f /var/lib/rpm/__db*' before trying to install the snake > package helps That seems to resolve the issue. So what does this mean? sh-4.0# chroot /mnt/sysimage /bin/su - [root@i386-70 ~]# rpm -q kernel error: cannot open Packages index using db3 - No such file or directory (2) error: cannot open Packages database in /var/lib/rpm error: cannot open Packages database in /var/lib/rpm [root@i386-70 ~]# rm -f /var/lib/rpm/__db.00* [root@i386-70 ~]# rpm -q kernel kernel-2.6.29.1-100.fc11.x86_64 It means that the different rpmdb flags we use from outside the chroot are making the environment incompatible. On a reboot, they'd get wiped but that won't help here Can you see if updates=http://katzj.fedorapeople.org/updates.cgz helps? Using the provided updates.img yields ... Running anaconda 11.5.0.46, the Fedora system installer - please wait... Traceback (most recent call last): File "/usr/bin/anaconda", line 551, in <module> import dispatch File "/usr/lib/anaconda/dispatch.py", line 26, in <module> from packages import writeKSConfiguration, turnOnFilesystems File "/tmp/updates/packages.py", line 29, in <module> import timer ImportError: No module named timer install exited abnormally [1/1] disabling swap... unmounting filesystems... Doh, that's because I gave you the wrong url. Suspiciously close and one that exists, but long different :) http://katzj.fedorapeople.org/updates.img ought to work better Using the provided updates.img works. sh-4.0# chroot /mnt/sysimage /bin/su - [root@i386-70 ~]# rpm -q kernel kernel-2.6.29.1-102.fc11.x86_64 Is this something we can target for F-11-Preview? This impacts RHTS/beaker automation of Fedora. I've pushed the fix to git. Not sure where things are in the compose process to know if we can get in another build. jkeating should know and then just ask in #anaconda if we need to get a build done The fix is in anaconda-11.5.0.48. Preview had .47. I just saw this again with anaconda-11.5.0.54-1.fc11.x86_64. Is it possible this bug came back? I'm doing the same thing - running rpm as the first thing in a %post. Created attachment 345663 [details]
strace rpm -qa in chroot
Here's an strace of rpm -qa inside the chroot.
*** Bug 503475 has been marked as a duplicate of this bug. *** Hum... from the strace in c#12: open("/var/tmp/imgcreate-OnSfl_/install_root/var/lib/rpm/Packages", O_RDONLY) = -1 ENOENT (No such file or directory) AFAICT that's a leftover by livecd-tools, you certainly dont want the db environment in images. This is supposedly already taken care of: commit c80a302bda3cc1fc55fac088613bbaa86467fe86 Author: Jeremy Katz <katzj> Date: Fri Oct 10 10:18:19 2008 -0400 Clean up rpmdb locks after installing packages also With new versions of RPM, people can otherwise run into things they don't expect inside of their %post scripts. So make things simpler for them ...but maybe something has changed since then. This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping btw, I experienced this too - something broke during installation under qemu, so I tried rescue mode of the installer, and I have found that rpm is not installed, so that I used the one provided by the installer ... after installing rpm and chrooting into /mnt/sysimage, I got the same error ... comment #2 helped Closing out bug that's been in MODIFIED for a while. |