[Pkg-debile-commits] [debile-slave] 06/100: nice
Sylvestre Ledru
sylvestre at alioth.debian.org
Mon Aug 19 14:52:58 UTC 2013
This is an automated email from the git hooks/post-receive script.
sylvestre pushed a commit to branch master
in repository debile-slave.
commit f6be5a061d516469d50200ade5e2af16b72acfc9
Author: Paul Tagliamonte <tag at pault.ag>
Date: Wed May 22 13:25:27 2013 -0400
nice
---
ethel/chroot.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ethel/chroot.py b/ethel/chroot.py
index a87a8e3..5a7cac8 100644
--- a/ethel/chroot.py
+++ b/ethel/chroot.py
@@ -60,9 +60,7 @@ def scmd(session, command, expected=0, user=None):
def schroot(chroot, source=False):
session = "ethel-%s" % (os.getpid())
chroot_name = chroot
- os.environ['CHROOT_FILE_REPACK'] = "false"
if source:
- os.environ['CHROOT_FILE_REPACK'] = "true"
chroot_name = "source:%s" % (chroot_name)
out, err = safe_run(['schroot', '-b', '-n', session, '-c', chroot_name])
@@ -72,7 +70,10 @@ def schroot(chroot, source=False):
print("[ethel] Started session: %s" % (session))
yield session
except Exception:
- os.environ['CHROOT_FILE_REPACK'] = "false"
+ if source:
+ print("[ethel] Session crashed. Aborting repack")
+ safe_run(['sudo', 'schroot-abort-repack', session])
+ # name ALL=NOPASSWD: /usr/local/bin/schroot-abort-repack
raise
finally:
out, err = safe_run(['schroot', '-e', '-c', session])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-slave.git
More information about the Pkg-debile-commits
mailing list