From aa6959fccd4e53b2c85689680d4686f7daf005f8 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 5 Oct 2014 04:28:18 +0200 Subject: reproducible: merge all non-random jobs into one candidates job --- bin/reproducible_build.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'bin/reproducible_build.sh') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index b9c878f0..4ffb6004 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -66,8 +66,24 @@ if [[ $1 =~ ^-?[0-9]+$ ]] ; then sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_stats VALUES (\"sid\", \"${P_IN_SOURCES}\")" rm $TMPFILE else - PACKAGES="$@" - AMOUNT="${#@}" + # CANDIDATES is defined in that file + . /srv/jenkins/bin/reproducible-candidates.sh + PACKAGES="" + AMOUNT="10" + REAL_AMOUNT=0 + for i in $(seq 0 ${#CANDIDATES[@]}) ; do + if [ $REAL_AMOUNT -eq $AMOUNT ] ; then + continue + fi + PKG=${CANDIDATES[$i]} + RESULT=$(sqlite3 ${PACKAGES_DB} "SELECT name FROM source_packages WHERE name = \"${PKG}\"") + if [ "$RESULT" = "" ] ; then + PACKAGES="${PACKAGES} $PKG" + let "REAL_AMOUNT=REAL_AMOUNT+1" + fi + done + AMOUNT=$REAL_AMOUNT + fi echo "=============================================================================" echo "The following $AMOUNT source packages will be build: ${PACKAGES}" -- cgit v1.2.3-70-g09d2