Using mock-1.4.2-1.fc25.noarch I am seeing problems running lorax. Running the following: mock -r fedora-rawhide-x86_64 --init mock -r fedora-rawhide-x86_64 --install lorax mock -r fedora-rawhide-x86_64 --chroot "lorax -p Fedora -v 27 -r 27 -s http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/ /builddir/results/" It runs normally, installing packages, until it hits the point where lorax chroots into the new installtree and tries to run rpm -qa: 2017-07-27 11:46:49,931: running runtime-postinstall.tmpl running runtime-postinstall.tmpl 2017-07-27 11:46:50,184: command returned failure (1) command returned failure (1) 2017-07-27 11:46:50,184: template command error in runtime-postinstall.tmpl: template command error in runtime-postinstall.tmpl: 2017-07-27 11:46:50,185: runcmd chroot /var/tmp/lorax.tkabpaqa/installtree /usr/bin/rpm -qa --pipe tee /root/lorax-packages.log runcmd chroot /var/tmp/lorax.tkabpaqa/installtree /usr/bin/rpm -qa --pipe tee /root/lorax-packages.log 2017-07-27 11:46:50,186: subprocess.CalledProcessError: Command '['chroot', '/var/tmp/lorax.tkabpaqa/installtree', '/usr/bin/rpm', '-qa', '--pipe', 'tee /root/lorax-packages.log']' returned non-zero exit status 1. command output: error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch error: cannot open Packages index using db5 - (-30969) error: cannot open Packages database in /var/lib/rpm error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch error: cannot open Packages index using db5 - (-30969) error: cannot open Packages database in /var/lib/rpm But if I run: mock -r fedora-rawhide-x86_64 --no-clean --chroot "chroot /var/tmp/lorax.tkabpaqa/installtree /usr/bin/rpm -qa" it runs fine. I have also tried running it under mock --old-chroot, but that results in the same error. This all used to work, and lorax has changed very little lately, so I'm pretty sure the problem lies with mock.
*** This bug has been marked as a duplicate of bug 1299482 ***