runroot: use /builddir/runroot.log instead of /tmp/runroot.log

With --new-chroot, /tmp is set up as a tmpfs mount, which does not persist,
so using /builddir instead.

Related: #482  (but not a fix)
https://pagure.io/koji/issue/482
This commit is contained in:
Mike McLean 2017-06-29 17:42:22 -04:00
parent a9dc698774
commit 14ec03f596

View file

@ -168,7 +168,7 @@ class RunRootTask(koji.tasks.BaseTaskHandler):
cmdstr = ' '.join(["'%s'" % arg.replace("'", r"'\''") for arg in command])
# A nasty hack to put command output into its own file until mock can be
# patched to do something more reasonable than stuff everything into build.log
cmdargs = ['/bin/sh', '-c', "{ %s; } < /dev/null 2>&1 | /usr/bin/tee /tmp/runroot.log; exit ${PIPESTATUS[0]}" % cmdstr]
cmdargs = ['/bin/sh', '-c', "{ %s; } < /dev/null 2>&1 | /usr/bin/tee /builddir/runroot.log; exit ${PIPESTATUS[0]}" % cmdstr]
# always mount /mnt/redhat (read-only)
# always mount /mnt/iso (read-only)
@ -185,7 +185,7 @@ class RunRootTask(koji.tasks.BaseTaskHandler):
mock_cmd.append('--')
mock_cmd.extend(cmdargs)
rv = broot.mock(mock_cmd)
log_paths = ['/tmp/runroot.log']
log_paths = ['/builddir/runroot.log']
if upload_logs is not None:
log_paths += upload_logs
for log_path in log_paths: