From 99e6133fda214c1ffbc608c0ae45bf21385b8150 Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Thu, 9 Jun 2011 15:27:00 +0000 Subject: [PATCH] tools/grab_md5: Make arch handling more generic - instead of having to list all arches, allow a wildcard and then check for lack of Packages.gz files --- debian/changelog | 10 +++++++--- tools/grab_md5 | 11 ++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index c3b6cafb..13196f3a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,9 +20,13 @@ debian-cd (3.1.6) UNRELEASED; urgency=low Closes: #622622 * update the URL for downloading i386 d-i dailies. * update the URL for downloading armel d-i dailies. - * tools/grab_md5: Improve Packages and Sources file parsing; cope with - differently-formed files that are still valid (don't assume field - ordering). Switch from awk to perl makes things much faster too! + * tools/grab_md5: + + Improve Packages and Sources file parsing; + + Cope with differently-formed files that are still valid (don't assume field + ordering). + + Switch from awk to perl makes things much faster too! + + Make arch handling more generic - instead of having to list all + arches, allow a wildcard and then check for lack of Packages.gz files [ Aurelien Jarno ] * Add support for hurd-i386. Closes: #619211 diff --git a/tools/grab_md5 b/tools/grab_md5 index ac8b4621..ee0ef094 100755 --- a/tools/grab_md5 +++ b/tools/grab_md5 @@ -49,10 +49,15 @@ do } }' | sort | uniq >> $OUT ;; - alpha|amd64|arm|armel|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc|kfreebsd-amd64|kfreebsd-i386|hurd-i386) + *) FILES=`find $LOCATIONS -name Packages.gz | grep binary-$ARCH` echo "Using MD5 sums from Packages files:" echo $FILES + NUM_FILES=`echo $FILES | wc -w` + if [ $NUM_FILES -eq 1 ] ; then + echo "No files found for arch $ARCH. Abort!" + exit 1 + fi zcat -f $FILES | MIRROR=$MIRROR perl -ne ' chomp; my $mirror = $ENV{"MIRROR"}; @@ -91,10 +96,6 @@ do fi done ;; - *) - echo "Unknown arch/source $ARCH!" - exit 1 - ;; esac done