From d7be2f96d11650c9441b62b4dfbfc2e126c9cbf4 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 28 Sep 2014 08:39:35 +0200 Subject: reproducible: explicitly ask for the right version --- bin/reproducible_build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index e86948e4..6c2011f0 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -65,14 +65,15 @@ for SRCPACKAGE in $PACKAGES ; do rm b1 b2 -rf set +e DATE=$(date +'%Y-%m-%d %H:%M') - apt-get source --download-only ${SRCPACKAGE} + VERSION=$(apt-cache showsrc ${SRCPACKAGE} | grep ^Version | cut -d " " -f2 | head -1) + + apt-get source --download-only ${SRCPACKAGE}=${VERSION} RESULT=$? if [ $RESULT != 0 ] ; then SOURCELESS="${SOURCELESS} ${SRCPACKAGE}" echo "Warning: ${SRCPACKAGE} is not a source package, or was removed or renamed. Please investigate." - sqlite3 $PACKAGES_DB "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"none available\", \"404\", \"$DATE\", \"\")" + sqlite3 $PACKAGES_DB "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"404\", \"$DATE\", \"\")" else - VERSION=$(grep ^Version ${SRCPACKAGE}_*.dsc | cut -d " " -f2 | head -1) STATUS=$(sqlite3 $PACKAGES_DB "SELECT status FROM source_packages WHERE name = \"${SRCPACKAGE}\" AND version = \"${VERSION}\"") if [ "$STATUS" = "reproducible" ] && [ $(( $RANDOM % 100 )) -gt 25 ] ; then echo "Package ${SRCPACKAGE} (${VERSION}) build reproducibly in the past and was thus randomly skipped." -- cgit v1.2.3-70-g09d2