[Piuparts-devel] Bug#686360: piuparts: New --schroot option fails on current schroot (session namespace missing)

Stephan Sürken absurd at debian.org
Fri Aug 31 15:34:17 UTC 2012


Package: piuparts
Version: 0.45
Severity: normal
Tags: patch

Dear Maintainer,

I was just testing the nice new '--schroot' option under sid;
this fails as there are some places schroot is called with
arguments '--chroot SESSION', with SESSION not having the
session namespace.

This fails at least for schroot in sid/testing.

These simple patches fixed it for me:

--- /usr/sbin/piuparts.orig	2012-06-21 22:19:17.000000000 +0200
+++ /usr/sbin/piuparts	2012-08-31 16:49:57.216780933 +0200
@@ -800,7 +800,7 @@
                 run(['lvremove', '-f', self.lvm_snapshot])
             if settings.schroot:
                 logging.debug("Terminate schroot session '%s'" % self.name)
-                run(['schroot', '--end-session', '--chroot', self.schroot_session])
+                run(['schroot', '--end-session', '--chroot', "session:" + self.schroot_session])
             if not settings.schroot:
                 shutil.rmtree(self.name)
                 logging.debug("Removed directory tree at %s" % self.name)
@@ -845,7 +845,7 @@
     def setup_from_schroot(self, schroot):
         self.schroot_session = schroot.split(":")[1] + "-" + str(uuid.uuid1()) + "-piuparts"
         run(['schroot', '--begin-session', '--chroot', schroot , '--session-name', self.schroot_session])
-        ret_code, output = run(['schroot', '--chroot', self.schroot_session, '--location'])
+        ret_code, output = run(['schroot', '--chroot', "session:" + self.schroot_session, '--location'])
         self.name = output.strip()
         logging.info("New schroot session in '%s'" % self.name);
 
@@ -875,7 +875,7 @@
                                                  'usr/bin/eatmydata')):
             prefix.append('eatmydata')
         if settings.schroot:
-            return run(["schroot", "--preserve-environment", "--run-session", "--chroot", self.schroot_session, "--directory", "/", "-u", "root", "--"] + prefix + command,
+            return run(["schroot", "--preserve-environment", "--run-session", "--chroot", "session:" + self.schroot_session, "--directory", "/", "-u", "root", "--"] + prefix + command,
                    ignore_errors=ignore_errors, timeout=settings.max_command_runtime)
         else:
             return run(["chroot", self.name] + prefix + command,


Thx!

Stephan

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-0.bpo.3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages piuparts depends on:
ii  debootstrap    1.0.42
ii  dpkg           1.16.8
ii  lsb-release    4.1+Debian7
ii  lsof           4.86+dfsg-1
ii  python         2.7.3-2
ii  python-debian  0.1.21

piuparts recommends no packages.

Versions of packages piuparts suggests:
ii  schroot  1.6.3-1

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/sbin/piuparts (from piuparts package)



More information about the Piuparts-devel mailing list