[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible arch: ignore arch schroot sessions in maintenance

Holger Levsen holger at moszumanska.debian.org
Sat Oct 17 15:14:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 6de8b04c1d0d77e0f5054a079452d4031fe686c4
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Oct 17 17:13:24 2015 +0200

    reproducible arch: ignore arch schroot sessions in maintenance
---
 TODO                    | 2 ++
 bin/common-functions.sh | 8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/TODO b/TODO
index 0102a96..50f3c65 100644
--- a/TODO
+++ b/TODO
@@ -302,7 +302,9 @@ properties:
 * more random notes:
 ** patch pacman to create .buildinfo files - or better: wait
 ** rename arch scripts and jobs to archlinux
+*** remember to adop cleanup_schroot_sessions() in common_functions.sh when renaming the schroots
 ** use archlinux.css not the one from freebsd :)
+*** use arch logo
 
 ----
 notes on source and binary versions:
diff --git a/bin/common-functions.sh b/bin/common-functions.sh
index 163833e..aa76527 100755
--- a/bin/common-functions.sh
+++ b/bin/common-functions.sh
@@ -136,11 +136,15 @@ cleanup_schroot_sessions() {
 	local RESULT=""
 	for loop in $(seq 0 40) ; do
 		# first, check if no process using "schroot" is running, if thats the case, loop through all schroot sessions:
-		pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l ) ; do
+		# arch sessions are ignored, because they are handled properly
+		pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l |grep -v "session:arch") ; do
 			# then, check that schroot is still not run, and then delete the session
+			if [ -z $i ] ; then
+				continue
+			fi
 			pgrep -f "schroot --directory" || schroot -e -c $i
 		done
-		RESULT=$(schroot --all-sessions -l)
+		RESULT=$(schroot --all-sessions -l|grep -v "session:arch")
 		if [ -z "$RESULT" ] ; then
 			echo "No schroot sessions in use atm..."
 			echo

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list