summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-05 04:28:18 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-05 05:06:12 +0200
commitaa6959fccd4e53b2c85689680d4686f7daf005f8 (patch)
tree3623501076c98079ac3de98d1bcd7b81e89e8c8b /bin/reproducible_build.sh
parent38080e1ef219cf505098d99758e498dcee4e29ed (diff)
downloadjenkins.debian.net-aa6959fccd4e53b2c85689680d4686f7daf005f8.tar.xz
reproducible: merge all non-random jobs into one candidates job
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-xbin/reproducible_build.sh20
1 files changed, 18 insertions, 2 deletions
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}"