#786 buildSRPMFromSCM tasks fail on koji 1.15
Closed: Fixed 4 years ago Opened 4 years ago by julian8628.

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 .

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'

Hmm, wondering if we shouldn't go through 'bind' way of these directories in long-term.

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

Login to comment on this ticket.

Metadata