Created attachment 1093194 [details] Proposed patch of the root_cache.py file Description of problem: This is related to https://bugzilla.redhat.com/show_bug.cgi?id=916685 which was closed, but the underlying issue did not get fixed. Unable to run mock -r <config> srpms/my.srpm on a Vagrant guest (running in /vagrant). The problem seems to come about in re-using the existing root cache. In _rootCacheLock, mockbuild.util.get_fs_type detects that /vagrant is an 'nfs' drive, and then changes the working-directory to a 'non-nfs' drive (from mockbuild.util.find_non_nfs_dir). However, as the working directory is no longer in /vagrant, mock is then unable to find the srpm. Have attached a possible patch (this assumes that the functionality of unpacking of the root cache is contained in that function, and there are no side effects where other functions may need to be in a non-nfs directory - IIUC, https://bugzilla.redhat.com/show_bug.cgi?id=649192 was originally raised to implement the get_fs_type/find_non_nfs_dir directory) Version-Release number of selected component (if applicable): mock-1.1.38-1.el6.noarch (but also able to reproduce in mock-1.2.7-1.el7.noarch) How reproducible: On a system where the home is an nfs (however, if the root cache is being re-built, e.g. it detected the mock config has changed, then that mock run succeeds). Steps to Reproduce: 1. Copy srpm to an 'nfs' mount directory (i.e. one that causes mockbuild.util.get_fs_type to return 'nfs') 2. Run mock <options> my.srpm Actual results: ERROR: [Errno 2] No such file or directory: Expected results: To find and build the srpm Additional info: Workaround is to run mock <options> <fullpath>/my.srpm
Commited as * fef4c05 (origin/devel, devel) after unpacking chroot, change back to $CWD [RHBZ#1281369]
mock-1.2.14-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-a295f19cae
mock-1.2.14-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-6d1cc55330
mock-1.2.14-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-b4d491366d
mock-1.2.14-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-fd9c932e3a
mock-1.2.14-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-3ef940024e
mock-1.2.14-1.el6 has been pushed to the Fedora EPEL 6 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=epel-testing update mock' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-fd9c932e3a
mock-1.2.14-1.el7 has been pushed to the Fedora EPEL 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=epel-testing update mock' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-a295f19cae
mock-1.2.14-1.fc21 has been pushed to the Fedora 21 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 'dnf --enablerepo=updates-testing update mock' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-b4d491366d
mock-1.2.14-1.fc22 has been pushed to the Fedora 22 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 'dnf --enablerepo=updates-testing update mock' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-3ef940024e
mock-1.2.14-1.fc23 has been pushed to the Fedora 23 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 'dnf --enablerepo=updates-testing update mock' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-6d1cc55330
mock-1.2.14-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.14-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.2.14-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.14-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.