From 06a611d49d1ed7da787e908d4d7b1aeb4d6e63d7 Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Sat, 29 Sep 2012 11:51:04 +0000 Subject: [PATCH] BACKPORT: Make grab_md5 more robust --- squeeze/debian/changelog | 1 + squeeze/tools/grab_md5 | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/squeeze/debian/changelog b/squeeze/debian/changelog index 50c7492c..0a8e02fb 100644 --- a/squeeze/debian/changelog +++ b/squeeze/debian/changelog @@ -58,6 +58,7 @@ debian-cd (3.1.6) UNRELEASED-backport; urgency=low * Don't exclude all the udebs for s390. Some users really do need them (loading from a CD/DVD used over the network). Closes: Bug #673576 * Explicitly add s390-tools and sysconfig-hardware for s390. + * Make grab_md5 more robust -- Raphaƫl Hertzog Fri, 04 Feb 2011 09:59:21 +0100 diff --git a/squeeze/tools/grab_md5 b/squeeze/tools/grab_md5 index ee0ef094..af18ae86 100755 --- a/squeeze/tools/grab_md5 +++ b/squeeze/tools/grab_md5 @@ -8,6 +8,8 @@ # Parse Packages and Sources files out of a mirror and pre-process # them into a single list ready for mkisofs to check later +set -e + MIRROR=$1 ARCHES="$2" CODENAME=$3 @@ -19,6 +21,13 @@ do LOCATIONS="$MIRROR/dists/$CODENAME/ $MIRROR/dists/$DI_CODENAME/" echo "Looking in $LOCATIONS" + for LOCATION in $LOCATIONS; do + if [ ! -d $LOCATION ]; then + echo "Error: $LOCATION is not a directory" + exit 1 + fi + done + case $ARCH in source) FILES=`find $LOCATIONS -name Sources.gz`