diff --git a/pungi/phases/buildinstall.py b/pungi/phases/buildinstall.py index eb3a46fe..c77a07c1 100644 --- a/pungi/phases/buildinstall.py +++ b/pungi/phases/buildinstall.py @@ -465,7 +465,9 @@ class BuildinstallThread(WorkerThread): channel=runroot_channel, use_shell=True, task_id=True, packages=packages, mounts=[compose.topdir], - weight=compose.conf['runroot_weights'].get('buildinstall')) + weight=compose.conf['runroot_weights'].get('buildinstall'), + destdir=output_dir, + ) # avoid race conditions? # Kerberos authentication failed: Permission denied in replay cache code (-1765328215) diff --git a/tests/test_buildinstall.py b/tests/test_buildinstall.py index 648a03f8..ff333194 100644 --- a/tests/test_buildinstall.py +++ b/tests/test_buildinstall.py @@ -745,9 +745,12 @@ class BuildinstallThreadTestCase(PungiTestCase): self.assertItemsEqual( get_runroot_cmd.mock_calls, - [mock.call('rrt', 'x86_64', self.cmd, channel=None, - use_shell=True, task_id=True, - packages=['lorax'], mounts=[self.topdir], weight=123)]) + [mock.call( + 'rrt', 'x86_64', self.cmd, channel=None, + use_shell=True, task_id=True, + packages=['lorax'], mounts=[self.topdir], weight=123, + destdir=os.path.join(self.topdir, "work/x86_64/buildinstall/Server"), + )]) self.assertItemsEqual( run_runroot_cmd.mock_calls, [mock.call(get_runroot_cmd.return_value, @@ -786,9 +789,12 @@ class BuildinstallThreadTestCase(PungiTestCase): self.assertItemsEqual( get_runroot_cmd.mock_calls, - [mock.call('rrt', 'x86_64', self.cmd, channel=None, - use_shell=True, task_id=True, - packages=['anaconda'], mounts=[self.topdir], weight=None)]) + [mock.call( + 'rrt', 'x86_64', self.cmd, channel=None, + use_shell=True, task_id=True, + packages=['anaconda'], mounts=[self.topdir], weight=None, + destdir=os.path.join(self.topdir, "work/x86_64/buildinstall"), + )]) self.assertItemsEqual( run_runroot_cmd.mock_calls, [mock.call(get_runroot_cmd.return_value, @@ -929,9 +935,12 @@ class BuildinstallThreadTestCase(PungiTestCase): self.assertItemsEqual( get_runroot_cmd.mock_calls, - [mock.call('rrt', 'x86_64', self.cmd, channel=None, - use_shell=True, task_id=True, - packages=['lorax'], mounts=[self.topdir], weight=123)]) + [mock.call( + 'rrt', 'x86_64', self.cmd, channel=None, + use_shell=True, task_id=True, + packages=['lorax'], mounts=[self.topdir], weight=123, + destdir="/buildinstall_topdir/buildinstall-%s/x86_64/Server" % os.path.basename(self.topdir), + )]) self.assertItemsEqual( run_runroot_cmd.mock_calls, [mock.call(get_runroot_cmd.return_value,