Description of problem: In some instances, during a chroot transaction, rpmlib seems to be checking outside the chroot for deps. The problem first appeared on a rhel5-ish build system, but once I isolated the problem I was able to replicate it on F11 Version-Release number of selected component (if applicable): (up to date F11 host) rpm-4.7.0-1.fc11.x86_64 yum-3.2.23-3.fc11.noarch kernel-2.6.29.4-167.fc11.x86_64 How reproducible: 100% Steps to Reproduce: 1. create a RHEL-4 chroot that includes xorg-x11-font-utils, but not xorg-x11-75dpi-fonts (I used mock to do this) 2. ensure /usr/X11R6 is not present in main system (outside chroot) 3. attempt to install xorg-x11-75dpi-fonts in the chroot... failure 4. now try 1-3 with /usr/X11R6 present (an empty dir will do) I've replicated step 3 with both yum and rpm directly. [root@megadoomer ~]# rpm --root /var/lib/mock/mikem/root -ivh fonts-xorg-75dpi-6.8.2-1.EL.noarch.rpm warning: fonts-xorg-75dpi-6.8.2-1.EL.noarch.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e error: Failed dependencies: /usr/X11R6/bin/mkfontdir is needed by fonts-xorg-75dpi-6.8.2-1.EL.noarch [root@megadoomer ~]# ls -l /var/lib/mock/mikem/root/usr/X11R6/bin/mkfontdir -rwxr-xr-x. 1 root root 137 2009-03-31 14:15 /var/lib/mock/mikem/root/usr/X11R6/bin/mkfontdir Actual results: install fails when /usr/X11R6 is not missing outside the chroot Expected results: data outside the chroot should not affect dependency resolution in the chroot Additional info: This is not the first time I've seen rpm behave badly with chroots (bug 192153).
erg, "Actual results" in the description should read: install fails when /usr/X11R6 is missing outside the chroot
Ok, easily reproduced. The issue is that rpmdbFindByFiles() doesn't take chroot into account when fingerprinting, that part of the bug is like 10 years or more old. Something between rpm 4.4.x and 4.6.x has caused the failing stat() to cause the item to be not found at all despite being present in the rpmdb. Taking chroot into account there isn't hard (I've a patch already), just hunting down what exactly causes the behavior change between 4.4.x and 4.6.x first.
The first half of the fix is here: http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=0055fecfde5404c5106ac0fc58052e9264da8592 That still leaves rpm doing fingerprint lookup outside chroot, will fix that too but at least with the above it doesn't cause bogus failure in this case.
Thanks for the quick turnaround! Tested out the patch and it does resolve the issue for us.
rpm-4.7.0-2.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/rpm-4.7.0-2.fc11
rpm-4.7.0-2.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update rpm'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6772
Is the second half of the fix in git?
rpm-4.7.0-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.