Mock does not work with RHEL4 U4. It appears to be an issue where the /var/lock/rpm/ directory needs to exist in the chroot before the yum command is run. This is due to a change in RPM that is talked about here: http://rhn.redhat.com/errata/RHBA-2006-0440.html This email thread talks about the issue: http://lists.centos.org/pipermail/centos/2006-September/069708.html There is a patch in the email which looks like this: patch for mock-0.6.4: ======================================================================== --- mock.orig 2006-09-05 08:59:59.000000000 +0400 +++ mock 2006-09-06 12:38:04.000000000 +0400 @@ -581,7 +581,8 @@ class Root: os.path.join(self.rootdir, 'etc/rpm'), os.path.join(self.rootdir, 'tmp'), os.path.join(self.rootdir, 'var/tmp'), - os.path.join(self.rootdir, 'etc/yum.repos.d')]: + os.path.join(self.rootdir, 'etc/yum.repos.d'), + os.path.join(self.rootdir, 'var/lock/rpm')]: self._ensure_dir(item) self._mount() ========================================================================
This is fixed in the 0.6.5 upstream mock, which hasn't landed in the FE repo's yet. You can grab my tarball from: http://people.redhat.com/williams/mock/mock-0.6.5.tar.gz Hopefully the FE package will be out tomorrow.