[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-109-g0f882a6
Holger Levsen
holger at layer-acht.org
Mon Sep 3 09:44:42 UTC 2012
The following commit has been merged in the develop branch:
commit 2a08438a99c02eba06247f3606735bd44cc0d2bd
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Sep 3 11:43:03 2012 +0200
Call schroot with session: argument, thanks for Stephan Sürken for the patch. (Closes: #686360)
diff --git a/piuparts.py b/piuparts.py
index 78d8292..1bf6da2 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -804,7 +804,7 @@ class Chroot:
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)
@@ -849,7 +849,7 @@ class Chroot:
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);
@@ -879,7 +879,7 @@ class Chroot:
'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,
--
piuparts git repository
More information about the Piuparts-commits
mailing list