[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: drop all these debbindiff lockfiles thinghies. They are not really needed and causes only troubles

Holger Levsen holger at moszumanska.debian.org
Mon Jun 8 07:01:20 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 3092f9f22cf6b2a1d7ac2dc40160f042daffa00a
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Mon Jun 8 02:53:49 2015 +0200

    reproducible: drop all these debbindiff lockfiles thinghies. They are not really needed and causes only troubles
---
 bin/reproducible_build.sh         | 24 +-----------------------
 bin/reproducible_common.sh        |  2 --
 bin/reproducible_setup_schroot.sh | 24 ------------------------
 3 files changed, 1 insertion(+), 49 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 23c2601..75917f9 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -211,27 +211,6 @@ handle_reproducible() {
 	fi
 }
 
-init_debbindiff() {
-	# the schroot for debbindiff gets updated once a day. wait patiently if that's the case
-	if [ -f $DBDCHROOT_WRITELOCK ] || [ -f $DBDCHROOT_READLOCK ] ; then
-		for i in $(seq 0 200) ; do  # this loop also exists in _common.sh and _setup_schroot.sh
-			sleep 15
-			echo "sleeping 15s, debbindiff schroot is locked."
-			if [ ! -f $DBDCHROOT_WRITELOCK ] && [ ! -f $DBDCHROOT_READLOCK ] ; then
-				break
-			fi
-		done
-		if [ -f $DBDCHROOT_WRITELOCK ] || [ -f $DBDCHROOT_READLOCK ]  ; then
-			echo "Warning: lock $DBDCHROOT_WRITELOCK or $DBDCHROOT_READLOCK still exists, exiting."
-			exit 1
-		fi
-	else
-		# we create (more) read-lock(s) but stop on write locks...
-		# write locks are only done by the schroot setup job
-		touch $DBDCHROOT_READLOCK
-	fi
-}
-
 dbd_timeout() {
 	local msg="$DBDVERSION was killed after running into timeout after $1"
 	if [ ! -s ./${DBDREPORT} ] ; then
@@ -261,7 +240,6 @@ check_buildinfo() {
 }
 
 call_debbindiff() {
-	init_debbindiff  # check and set up locks for chroot
 	local TMPLOG=(mktemp --tmpdir=$TMPDIR)
 	echo | tee -a ${RBUILDLOG}
 	local TIMEOUT="30m"  # don't forget to also change the "seq 0 200" loop 33 lines above
@@ -286,7 +264,7 @@ call_debbindiff() {
 	if ! "$DEBUG" ; then set +x ; fi
 	set -e
 	cat $TMPLOG | tee -a $RBUILDLOG  # print dbd output
-	rm -f $DBDCHROOT_READLOCK $TMPLOG
+	rm $TMPLOG
 	echo | tee -a ${RBUILDLOG}
 	case $RESULT in
 		0)
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index b175f93..c351dc9 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -34,8 +34,6 @@ fi
 
 # common variables
 REPRODUCIBLE_URL=https://reproducible.debian.net
-DBDCHROOT_READLOCK=/var/lib/jenkins/reproducible-dbdchroot.readlock
-DBDCHROOT_WRITELOCK=/var/lib/jenkins/reproducible-dbdchroot.writelock
 # shop trailing slash
 JENKINS_URL=${JENKINS_URL:0:-1}
 
diff --git a/bin/reproducible_setup_schroot.sh b/bin/reproducible_setup_schroot.sh
index e76acec..a6a04c4 100755
--- a/bin/reproducible_setup_schroot.sh
+++ b/bin/reproducible_setup_schroot.sh
@@ -129,29 +129,6 @@ bootstrap $@
 
 trap - INT TERM EXIT
 
-remove_writelock() {
-	# remove the lock
-	rm $DBDCHROOT_WRITELOCK
-}
-
-trap remove_writelock INT TERM EXIT
-# aquire a write lock in any case
-touch $DBDCHROOT_WRITELOCK
-if [ -f $DBDCHROOT_READLOCK ] ; then
-	# patiently wait for our users to using the schroot
-	for i in $(seq 0 200) ; do
-		sleep 15
-		echo "sleeping 15s, debbindiff schroot is locked and used."
-		if [ ! -f $DBDCHROOT_READLOCK ] ; then
-			break
-		fi
-	done
-	if [ -f $DBDCHROOT_READLOCK ] ; then
-		echo "Warning: lock $DBDCHROOT_READLOCK still exists, exiting."
-		exit 1
-	fi
-fi
-
 # pivot the new schroot in place
 rand=$RANDOM
 if [ -d $SCHROOT_BASE/"$TARGET" ]
@@ -179,4 +156,3 @@ sudo tee /etc/schroot/chroot.d/jenkins-"$TARGET" <<-__END__
 	__END__
 
 trap - INT TERM EXIT
-remove_writelock

-- 
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