On some newer mock releases (tried on 1.2.21 and 1.4.8), chroothome dir will be clean at very begin when running mock --buildsrpm. After source code is checkout to <chroothome>/tmp/scmroot, it will be removed .
chroothome
mock --buildsrpm
<chroothome>/tmp/scmroot
File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 663, in main run_command(options, args, config_opts, commands, buildroot, state) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 748, in run_command do_buildsrpm(config_opts, commands, buildroot, options, args) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 521, in do_buildsrpm cmd=cmd, post=None, clean=clean) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 449, in rebuild_generic ret = cmd(item) File "/usr/sbin/mock", line 519, in cmd follow_links=options.symlink_dereference) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 315, in buildsrpm shutil.copy(spec, self.buildroot.make_chroot_path(self.buildroot.builddir, "SPECS")) File "/usr/lib64/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/var/lib/mock/f27-build-mjsx-1-2/root/builddir/tmp/scmroot/grep/grep.spec'
PR #787
Hmm, wondering if we shouldn't go through 'bind' way of these directories in long-term.
I don't think bind mounts are really needed for this
Commit 8f5edb98 fixes this issue
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/786
Please continue any further discussion there.