diff options
-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 |