From c941f344d9abdec3d51882b4b0dc9c9e7fc3a0b2 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 30 Sep 2014 13:08:20 +0200 Subject: reproducible: very few packages have their spectactularily failing wheezy version in sids sources.list, so more carefully try to guess the latest version in sid... test said package again too... --- bin/reproducible_build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 6c3fe696..acfec3b6 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -68,7 +68,7 @@ if [[ $1 =~ ^-?[0-9]+$ ]] ; then REAL_AMOUNT=0 GUESSES=$(echo "${AMOUNT}*3" | bc) PACKAGES="" - CANDIDATES=$(xzcat $TMPFILE | grep "^Package" | grep -v "^Package-List:" | cut -d " " -f2 | egrep -v "^(linux$|util-linux)$" | sort -R | head -$GUESSES | xargs echo) + CANDIDATES=$(xzcat $TMPFILE | grep "^Package" | grep -v "^Package-List:" | cut -d " " -f2 | egrep -v "^linux$" | sort -R | head -$GUESSES | xargs echo) for PKG in $CANDIDATES ; do if [ $REAL_AMOUNT -eq $AMOUNT ] ; then continue @@ -138,7 +138,7 @@ for SRCPACKAGE in ${PACKAGES} ; do rm b1 b2 -rf set +e DATE=$(date +'%Y-%m-%d %H:%M') - VERSION=$(apt-cache showsrc ${SRCPACKAGE} | grep ^Version | cut -d " " -f2 | head -1) + VERSION=$(apt-cache showsrc ${SRCPACKAGE} | grep ^Version | cut -d " " -f2 | sort -r | 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 ) @@ -148,13 +148,15 @@ for SRCPACKAGE in ${PACKAGES} ; do SKIPPED="${SRCPACKAGE} ${SKIPPED}" continue fi - apt-get source --download-only --only-source ${SRCPACKAGE}=${VERSION} + # host has only sid in deb-src in sources.list + apt-get source --download-only --only-source ${SRCPACKAGE} RESULT=$? if [ $RESULT != 0 ] ; then SOURCELESS="${SOURCELESS} ${SRCPACKAGE}" echo "Warning: ${SRCPACKAGE} is not a source package, or was removed or renamed. Please investigate." sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"404\", \"$DATE\", \"\")" else + VERSION=$(grep "^Version: " ${SRCPACKAGE}_*.dsc| head -1 | cut -d ":" -f2-) ARCH=$(grep "^Architecture: " ${SRCPACKAGE}_*.dsc| cut -d ":" -f2) if [[ ! "$ARCH" =~ "amd64" ]] && [[ ! "$ARCH" =~ "all" ]] && [[ ! "$ARCH" =~ "any" ]] ; then sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"not for us\", \"$DATE\", \"\")" -- cgit v1.2.3-70-g09d2