summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-10 12:15:51 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-10 12:15:51 +0200
commitdace30d88583e7e45deaa7116de8bf608db0ef59 (patch)
tree7124f7a90b0e2355f041b83e0e4130012603be54
parent29e312a97ecfafdb9621dc223c3fdfb7a1ecdae9 (diff)
downloadjenkins.debian.net-dace30d88583e7e45deaa7116de8bf608db0ef59.tar.xz
reproducible: cleanup sessions more carefully
-rw-r--r--TODO1
-rwxr-xr-xbin/schroot-create.sh11
2 files changed, 10 insertions, 2 deletions
diff --git a/TODO b/TODO
index 2cd8d526..1c0ad1cb 100644
--- a/TODO
+++ b/TODO
@@ -171,6 +171,7 @@ properties:
* higher prio:
** reproducible_build.sh changes needed:
+*** fix: "DIFFOSCOPE='E: Failed to change to directory ‘/tmp’: Permission denied" - maybe by making sure the cause is gone…
*** handle_unhandled() needs to unregister the build from the db too
*** rbuild.log isnt show when a package ftbfs
*** diffoscope needs to be run on the target arch...
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index 51859325..348842c6 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -183,8 +183,15 @@ bootstrap() {
cleanup_schroot_sessions() {
# FIXME: if this works well, move to _common.sh and use the same function from _maintenance.sh
- ps fax|grep -v grep |grep schroot || for i in $(schroot --all-sessions -l ) ; do ps fax|grep -v grep |grep schroot || schroot -e -c $i ; done
- schroot --all-sessions -l
+ local RESULT=""
+ for loop in $(seq 0 9) ; do
+ ps fax|grep -v grep |grep schroot || for i in $(schroot --all-sessions -l ) ; do ps fax|grep -v grep |grep schroot || schroot -e -c $i ; done
+ RESULT=$(schroot --all-sessions -l)
+ if [ -z "$RESULT" ] ; then
+ break
+ fi
+ sleep 5
+ done
}
cleanup() {