diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-09-28 08:39:35 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-09-28 08:39:35 +0200 |
commit | d7be2f96d11650c9441b62b4dfbfc2e126c9cbf4 (patch) | |
tree | 3fadfd1944a97b6eb675816a6513dba843dc1e3e | |
parent | dbd4e9b424cbedf61cc9b7ab8b5fab0c2bc7e920 (diff) | |
download | jenkins.debian.net-d7be2f96d11650c9441b62b4dfbfc2e126c9cbf4.tar.xz |
reproducible: explicitly ask for the right version
-rwxr-xr-x | bin/reproducible_build.sh | 7 |
1 files 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." |