Description of problem: If any rpm sets immutable bit mock is unable to clean up build chroot dir. Version-Release number of selected component (if applicable): mock-0.6.13 How reproducible: Try to build rhel5 packages so that your build needs nss-3.11.5-3.el5 nss-3.11.5-3.el5 sets immutable bit to two library files. Steps to Reproduce: 1. mock -r rhel-5-i386 build /path/sourcerpmfilename 2. mock -r rhel-5-i386 build /path/othersourcerpmfile Actual results: Mock fails to clean up /var/lib/mock/rhel-5-i386/root and second build fails. Expected results: second package should be built. Proposed fix: Mock should run chattr -R -i to clear immutable bit from files inside chroot root dir before trying to clean it.
Created attachment 151626 [details] Patch to add chattr -R -i run before trying to clean up chroot
Created attachment 154583 [details] Improved patch to add chattr -i run I improved patch so that now mock first try to clean up with rm, and if rm fails, try to chattr -i root and run rm again after that. This change speeds up clean because chattr -i is run only if rm fails on first run.
Created attachment 159768 [details] Updated chatttr -i cleanup patch for mock 0.7, tested with 0.7.4.
Created attachment 195791 [details] chattr -i patch upgraded for mock-0.7.6
fixed for upcoming mock 0.8.3
mock-0.8.4-2.fc7 has been pushed to the Fedora 7 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 mock'
mock-0.8.4-2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.
mock-0.8.4-2.fc8 has been pushed to the Fedora 8 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 mock'
mock-0.8.4-2.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.