Created attachment 538663 [details] Patch against mockbuild/backend.py that resolves the issue. Description of problem: I'm using mock 1.1.16 on F16, and using SCM integration. The package I'm working with, when first checked out, has a dangling symlink (ie, a symlink whose target is not present) that is later used in its build process. I ran into 2 issues with this: 1) in mockbuild/backend.py, function buildsrpm, the os.rmdir and shutil.copytree functions throw exceptions. I've resolved this by replacing os.rmdir with mockbuild.util.rmtree, and adding the 'symlinks=True' option to shutil.copytree. 2) This took longer to track down that necessary, as the exceptions thrown by os.rmdir were being eaten by the extra try,except clause embedded in buildsrpm's finally clause. Version-Release number of selected component (if applicable): mock 1.1.6 How reproducible: easy! Steps to Reproduce: 1. Create an SCM package whose SCM contents include a symlink whose target is missing. 2. Use mock to try and build the package. Actual results: Mock will give an error stating 'No package specified to rebuild command', coming from do_rebuild. Expected results: the scm should build. Additional info:
Added Marko to the CC (since he's Mr SCM :)). The patch looks good, I'll look at adding this to the next release.
Yup, the patch looks good, thanks!
Added to my work branch, will be there in next release.
mock-1.1.19-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.19-1.el6
mock-1.1.19-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mock-1.1.19-1.fc16
mock-1.0.26-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.26-1.el5
mock-1.1.19-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.19-1.fc15
mock-1.1.19-2.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.19-2.fc15
mock-1.1.19-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.19-2.el6
mock-1.0.26-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.26-2.el5
mock-1.1.19-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mock-1.1.19-2.fc16
Package mock-1.1.19-2.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.1.19-2.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-0134/mock-1.1.19-2.el6 then log in and leave karma (feedback).
mock-1.1.19-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.20-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.20-1.fc15
mock-1.1.20-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.20-1.el6
mock-1.1.20-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mock-1.1.20-1.fc16
mock-1.0.27-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.27-2.el5
mock-1.1.20-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.21-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.21-1.fc15
mock-1.1.21-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.21-1.el6
mock-1.0.28-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.28-1.el5
mock-1.1.21-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mock-1.1.21-1.fc16
mock-1.1.21-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.21-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.21-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.0.28-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.