[Qa-jenkins-scm] [jenkins.debian.net] 02/03: reproducible arch: randomize schroot session names

Holger Levsen holger at moszumanska.debian.org
Fri Oct 16 16:10:26 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 1cc177bd9f009fdf63f2ec7e1730cae40aba59b7
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Oct 16 17:58:06 2015 +0200

    reproducible arch: randomize schroot session names
---
 bin/reproducible_build_arch_pkg.sh | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh
index c75caf7..dee34e9 100755
--- a/bin/reproducible_build_arch_pkg.sh
+++ b/bin/reproducible_build_arch_pkg.sh
@@ -17,7 +17,7 @@ cleanup_all() {
 	rm $TMPDIR -r
 	echo "$(date -u) - $TMPDIR deleted."
 	if [ "$MODE" != "master" ] ; then
-		schroot --end-session -c arch-$SRCPACKAGE > /dev/null 2>&1 || true
+		schroot --end-session -c arch-$SRCPACKAGE-$(basename $TMDPIR) > /dev/null 2>&1 || true
 	fi
 }
 
@@ -37,10 +37,11 @@ first_build() {
 	echo "Date UTC: $(date -u)"
 	echo "============================================================================="
 	set -x
-	schroot --begin-session --session-name=arch-$SRCPACKAGE -c jenkins-reproducible-arch
-	schroot --run-session -c arch-$SRCPACKAGE --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp
-	schroot --run-session -c arch-$SRCPACKAGE --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck
-	schroot --end-session -c arch-$SRCPACKAGE
+	local SESSION="arch-$SRCPACKAGE-$(basename $TMDPIR)"
+	schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch
+	schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp
+	schroot --run-session -c $SESSION --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck
+	schroot --end-session -c $SESSION
 	if ! "$DEBUG" ; then set +x ; fi
 }
 
@@ -51,10 +52,11 @@ second_build() {
 	echo "Date UTC: $(date -u)"
 	echo "============================================================================="
 	set -x
-	schroot --begin-session --session-name=arch-$SRCPACKAGE -c jenkins-reproducible-arch
-	schroot --run-session -c arch-$SRCPACKAGE --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp
-	schroot --run-session -c arch-$SRCPACKAGE --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck
-	schroot --end-session -c arch-$SRCPACKAGE
+	local SESSION="arch-$SRCPACKAGE-$(basename $TMDPIR)"
+	schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch
+	schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp
+	schroot --run-session -c $SESSION --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck
+	schroot --end-session -c $SESSION
 	if ! "$DEBUG" ; then set +x ; fi
 }
 

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