#411 use --new-chroot when making ostree's
Merged 7 years ago by lsedlar. Opened 7 years ago by ausil.
Unknown source new-chroot  into  master

file modified
+1 -1
@@ -27,7 +27,7 @@

  Requires:       libselinux-python

  Requires:       createrepo_c

  Requires:       python-lxml

- Requires:       koji

+ Requires:       koji >= 1.10.1-13

  Requires:       jigdo

  Requires:       cvs

  Requires:       yum-utils

file modified
+2 -1
@@ -93,7 +93,8 @@

          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 @@

          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")

  

file modified
+1 -1
@@ -108,7 +108,7 @@

                                       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')])

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

Looks good to me, merging.

Pull-Request has been merged by lsedlar

7 years ago