From f1eb745cc2ea25833ebb8c069d97c429922c4337 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 11 Dec 2015 14:39:51 +0100 Subject: reproducible archlinux: refactor --- bin/reproducible_build_archlinux_pkg.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index a15f7bf6..64b5c3ee 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -39,9 +39,8 @@ handle_remote_error() { exit 0 } -choose_package() { - echo "$(date -u ) - about to choose a package to be build" - # every 2 days we check for new archlinux packages +update_archlinux_repositories() { + # every 2 days we check for new archlinux packages in all tested repositories touch -d "$(date -d '2 days ago' '+%Y-%m-%d') 00:00 UTC" $DUMMY local SESSION="archlinux-scheduler-$RANDOM" schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux @@ -56,6 +55,12 @@ choose_package() { done schroot --end-session -c $SESSION rm $DUMMY > /dev/null +} + +choose_package() { + echo "$(date -u ) - choosing package to be build." + update_archlinux_repositories + local REPO local PKG for REPO in $ARCHLINUX_REPOS ; do case $REPO in -- cgit v1.2.3-70-g09d2