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
This commit is contained in:
Steve McIntyre 2011-06-09 15:27:00 +00:00
parent 17686a2761
commit 99e6133fda
2 changed files with 13 additions and 8 deletions

10
debian/changelog vendored
View File

@ -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

View File

@ -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