Description of problem: mock -r fedora-rawhide-x86_64 --clean mock -r fedora-rawhide-x86_64 --init mock -r fedora-rawhide-x86_64 --install rrdtool mock -r fedora-rawhide-x86_64 --shell Version-Release number of selected component: mock-1.2.8-1.fc21 Additional info: reporter: libreport-2.3.0 cmdline: /usr/bin/python -tt /usr/sbin/mock -r fedora-rawhide-x86_64 --clean --init --install rrdtool executable: /usr/sbin/mock kernel: 3.19.7-200.fc21.x86_64 runlevel: N 5 type: Python uid: 0 Truncated backtrace: buildroot.py:442:_setup_devices:OSError: [Errno 17] File exists Traceback (most recent call last): File "/usr/sbin/mock", line 831, in <module> main() File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 653, in main run_command(options, args, config_opts, commands, buildroot, state) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 708, in run_command commands.init() File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 123, in init self.buildroot.initialize(**kwargs) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 84, in initialize self._init(prebuild=prebuild, do_log=do_log) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 128, in _init self._setup_devices() File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 442, in _setup_devices os.symlink("/proc/self/mounts", self.make_chroot_path('etc', 'mtab')) OSError: [Errno 17] File exists Local variables in innermost frame: i: (8630, 1282, 'dev/ptmx') devFiles: [(8630, 259, 'dev/null'), (8630, 263, 'dev/full'), (8630, 261, 'dev/zero'), (8630, 264, 'dev/random'), (8484, 265, 'dev/urandom'), (8630, 1280, 'dev/tty'), (8576, 1281, 'dev/console'), (8630, 1282, 'dev/ptmx')] prevMask: 2 self: <mockbuild.buildroot.Buildroot object at 0x7f8ee75611d0> kver: '3.19.7-200.fc21.x86_64'
Created attachment 1029458 [details] File: backtrace
Created attachment 1029459 [details] File: environ
It's very annoying that I have to each time run: # sudo rm -f /var/lib/mock/fedora-rawhide-x86_64/root/etc/mtab to fix the problem.
In mockbuild/buildroot.py, lines 440-442 are (minus some whitespace): if os.path.isfile(self.make_chroot_path('etc', 'mtab')): os.remove(self.make_chroot_path('etc', 'mtab')) os.symlink("/proc/self/mounts", self.make_chroot_path('etc', 'mtab')) The problem is that os.path.isfile returns false for a symbolic link. Possible solutions: - Do the remove if either os.path.isfile or os.path.islink returns true - Change os.path.isfile to os.path.lexists - Nuke the check altogether and call os.remove every time
This was fixed in upstream in commit cd3406f2eb4449a442e15bb8b1653436585c7c1c
Any estimated date of a new release for F21? This really blocks our CI [1] since I don't see any obvious workaround. (AFAIK I cannot do the trick in comment 3 when using tito) [1] https://bugzilla.redhat.com/show_bug.cgi?id=1225015#c4
I will do the release of new version today.
*** Bug 1228064 has been marked as a duplicate of this bug. ***
mock-1.2.10-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/mock-1.2.10-1.fc22
mock-1.2.10-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.10-1.fc21
mock-1.2.10-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.10-1.fc20
mock-1.2.10-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.10-1.el7
mock-1.2.10-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.10-1.el6
Many thanks!
Package mock-1.2.10-1.el7: * should fix your issue, * was pushed to the Fedora EPEL 7 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.2.10-1.el7' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6557/mock-1.2.10-1.el7 then log in and leave karma (feedback).
mock-1.2.10-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
Another user experienced a similar problem: fedora-review -b 1229518 reporter: libreport-2.3.0 cmdline: /usr/bin/python -tt /usr/sbin/mock --no-cleanup-after --no-clean --resultdir=/home/sergio/fedora-scm/gdesklets/1229518-gdesklets/results -q --chroot -- 'rpm --eval %_topdir' executable: /usr/sbin/mock kernel: 4.0.4-202.fc21.x86_64 package: mock-1.2.9-1.fc21 reason: buildroot.py:442:_setup_devices:OSError: [Errno 17] File exists runlevel: N 5 type: Python uid: 0
mock-1.2.10-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.10-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.10-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.10-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.
*** Bug 1236040 has been marked as a duplicate of this bug. ***