From eb1131b3dfe4729102262c0fc85b0c6bd8e19b4d Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Sat, 23 Dec 2006 03:03:58 +0000 Subject: [PATCH] Make make_disc_trees.pl and start_new_disc fail better on errors --- debian/changelog | 1 + tools/make_disc_trees.pl | 6 +++++- tools/start_new_disc | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 15acc0c9..b33c4d6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -196,6 +196,7 @@ debian-cd (3.0.0) UNRELEASED; urgency=low * Other cleanups: + Make build_all.sh work again, adapting build.sh + Promote Suggests: on netpbm, syslinux to Recommends: + + Make make_disc_trees.pl and start_new_disc fail better on errors -- Frans Pop Mon, 18 Dec 2006 16:20:22 +0100 diff --git a/tools/make_disc_trees.pl b/tools/make_disc_trees.pl index 98c1514a..c97309c2 100755 --- a/tools/make_disc_trees.pl +++ b/tools/make_disc_trees.pl @@ -337,8 +337,12 @@ sub get_disc_size { } sub start_disc { + my $error = 0; - system("start_new_disc $basedir $mirror $tdir $codename \"$archlist\" $disknum"); + $error = system("start_new_disc $basedir $mirror $tdir $codename \"$archlist\" $disknum"); + if ($error != 0) { + die " Failed to start disc $disknum, error $error\n"; + } get_disc_size(); diff --git a/tools/start_new_disc b/tools/start_new_disc index f1e69067..21d4e272 100755 --- a/tools/start_new_disc +++ b/tools/start_new_disc @@ -343,11 +343,15 @@ do $BASEDIR/tools/$CODENAME/upgrade-$ARCH.sh $DISKNUM $CDDIR fi - echo " (Optionally) making the image bootable for $ARCH" + echo " (Optionally) making the image bootable for $ARCH:" if [ -f $BASEDIR/tools/boot/$DI_CODENAME/boot-$ARCH ] ; then cd $TDIR echo " Running tools/boot/$DI_CODENAME/boot-$ARCH $DISKNUM $CDDIR" - $BASEDIR/tools/boot/$DI_CODENAME/boot-$ARCH $DISKNUM $CDDIR + $BASEDIR/tools/boot/$DI_CODENAME/boot-$ARCH $DISKNUM $CDDIR || booterror=$? + if [ "$booterror"x != ""x ] ; then + echo " FAILED: error $booterror" + exit $booterror + fi else if [ "${IGNORE_MISSING_BOOT_SCRIPT:-0}" = "0" ] ; then echo " No script to make CDs bootable for $ARCH"