[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible archlinux: fix two subtle bugs, preventing the packages list to be updated and causing always the last repo to be choosen

Holger Levsen holger at moszumanska.debian.org
Tue Dec 15 02:44:08 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 e8fa5d1e69459f96e5b356b907e3ea01df809752
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Dec 15 03:43:46 2015 +0100

    reproducible archlinux: fix two subtle bugs, preventing the packages list to be updated and causing always the last repo to be choosen
---
 bin/reproducible_build_archlinux_pkg.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index ed3847a..0dab2b3 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -49,7 +49,6 @@ update_archlinux_repositories() {
 			NEED_UPDATE=true
 		fi
 	done
-	rm $DUMMY > /dev/null
 	if $NEED_UPDATE ; then
 		local SESSION="archlinux-scheduler-$RANDOM"
 		schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
@@ -65,6 +64,7 @@ update_archlinux_repositories() {
 	else
 		echo "$(date -u ) - repositories recent enough, no update needed."
 	fi
+	rm $DUMMY > /dev/null
 }
 
 choose_package() {
@@ -90,11 +90,14 @@ choose_package() {
 				# very simple locking…
 				mkdir -p $BASE/archlinux/$REPOSITORY/$PKG
 				touch $BASE/archlinux/$REPOSITORY/$PKG
-				# break out of the loop and then out of this function too,
-				# to build this package…
+				# break out of the loop (and then out of the next loop too...)
 				break
 			fi
 		done
+		# if we broke out of the previous loop we have choosen a package
+		if [ ! -z "$SRCPACKAGE" ] ; then
+			break
+		fi
 	done
 	if [ -z $SRCPACKAGE ] ; then
 		echo "$(date -u ) - no package found to be build, sleeping 6h."

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