From e8fa5d1e69459f96e5b356b907e3ea01df809752 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 15 Dec 2015 03:43:46 +0100 Subject: 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(-) (limited to 'bin/reproducible_build_archlinux_pkg.sh') diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index ed3847ab..0dab2b36 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." -- cgit v1.2.3-54-g00ecf