use --new-chroot when making ostree's
to complement https://pagure.io/koji/pull-request/162 we need to adjust pungi rpm-ostree uses bublewrap that does not work in mock. --new-chroot to mock enables the use of systemd-nspawn instead of chroot resulting in working rpm-ostree again Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
parent
c0474b6cca
commit
4e90f81fc1
@ -27,7 +27,7 @@ Requires: python-kickstart
|
||||
Requires: libselinux-python
|
||||
Requires: createrepo_c
|
||||
Requires: python-lxml
|
||||
Requires: koji
|
||||
Requires: koji >= 1.10.1-13
|
||||
Requires: jigdo
|
||||
Requires: cvs
|
||||
Requires: yum-utils
|
||||
|
@ -93,7 +93,8 @@ class OSTreeThread(WorkerThread):
|
||||
koji_cmd = koji.get_runroot_cmd(runroot_tag, arch, cmd,
|
||||
channel=runroot_channel,
|
||||
use_shell=True, task_id=True,
|
||||
packages=packages, mounts=mounts)
|
||||
packages=packages, mounts=mounts,
|
||||
new_chroot=True)
|
||||
output = koji.run_runroot_cmd(koji_cmd, log_file=log_file)
|
||||
if output["retcode"] != 0:
|
||||
raise RuntimeError("Runroot task failed: %s. See %s for more details."
|
||||
|
@ -59,12 +59,15 @@ class KojiWrapper(object):
|
||||
else:
|
||||
raise RuntimeError('Unsupported authentication type in Koji')
|
||||
|
||||
def get_runroot_cmd(self, target, arch, command, quiet=False, use_shell=True, channel=None, packages=None, mounts=None, weight=None, task_id=True):
|
||||
def get_runroot_cmd(self, target, arch, command, quiet=False, use_shell=True, channel=None, packages=None, mounts=None, weight=None, task_id=True, new_chroot=False):
|
||||
cmd = [self.executable, "runroot"]
|
||||
|
||||
if quiet:
|
||||
cmd.append("--quiet")
|
||||
|
||||
if new_chroot:
|
||||
cmd.append("--new-chroot")
|
||||
|
||||
if use_shell:
|
||||
cmd.append("--use-shell")
|
||||
|
||||
|
@ -108,7 +108,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
|
||||
self.repo],
|
||||
channel=None, mounts=[self.topdir, self.repo],
|
||||
packages=['pungi', 'ostree', 'rpm-ostree'],
|
||||
task_id=True, use_shell=True)])
|
||||
task_id=True, use_shell=True, new_chroot=True)])
|
||||
self.assertEqual(koji.run_runroot_cmd.call_args_list,
|
||||
[mock.call(koji.get_runroot_cmd.return_value,
|
||||
log_file=self.topdir + '/logs/x86_64/Everything/ostree-1/runroot.log')])
|
||||
|
Loading…
Reference in New Issue
Block a user