diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-09-30 00:45:18 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-09-30 00:45:18 +0200 |
commit | 348c0930f8cbd34f8e19c5bd2b5c28e695746958 (patch) | |
tree | 090de0d0ccb377433118ee52556110a71cb97dda /bin | |
parent | 3584dcd924ca7b86d0de1c8ce29b8856e31c1f77 (diff) | |
download | jenkins.debian.net-348c0930f8cbd34f8e19c5bd2b5c28e695746958.tar.xz |
reproducible: skip known package/versions earlier and more often
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index bbdc215f..2be0c9c3 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -136,7 +136,15 @@ for SRCPACKAGE in ${PACKAGES} ; do set +e DATE=$(date +'%Y-%m-%d %H:%M') VERSION=$(apt-cache showsrc ${SRCPACKAGE} | grep ^Version | cut -d " " -f2 | head -1) - + # check if we tested this version already before... + STATUS=$(sqlite3 ${PACKAGES_DB} "SELECT status FROM source_packages WHERE name = \"${SRCPACKAGE}\" AND version = \"${VERSION}\"") + # if reproducible or ( unreproducible/FTBFS by 50% chance ) + if [ "$STATUS" = "reproducible" ] || (( [ "$STATUS" = "unreproducible" ] || [ "$STATUS" = "FTBFS" ] ) && [ $(( $RANDOM % 100 )) -gt 50 ] ) ; then + echo "Package ${SRCPACKAGE} (${VERSION}) with status '$STATUS' skipped, no newer version available." + let "COUNT_SKIPPED=COUNT_SKIPPED+1" + SKIPPED="${SRCPACKAGE} ${SKIPPED}" + continue + fi apt-get source --download-only --only-source ${SRCPACKAGE}=${VERSION} RESULT=$? if [ $RESULT != 0 ] ; then @@ -152,13 +160,6 @@ for SRCPACKAGE in ${PACKAGES} ; do SKIPPED="${SRCPACKAGE} ${SKIPPED}" continue fi - STATUS=$(sqlite3 ${PACKAGES_DB} "SELECT status FROM source_packages WHERE name = \"${SRCPACKAGE}\" AND version = \"${VERSION}\"") - if [ "$STATUS" = "reproducible" ] && [ $(( $RANDOM % 100 )) -gt 20 ] ; then - echo "Package ${SRCPACKAGE} (${VERSION}) build reproducibly in the past and was thus randomly skipped." - let "COUNT_SKIPPED=COUNT_SKIPPED+1" - SKIPPED="${SRCPACKAGE} ${SKIPPED}" - continue - fi # EPOCH_FREE_VERSION was too long EVERSION=$(echo $VERSION | cut -d ":" -f2) sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc | tee ${SRCPACKAGE}_${EVERSION}.pbuilder.log |