diff --git a/debian/changelog b/debian/changelog index 230424d4..acd02ca2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -63,6 +63,10 @@ debian-cd (3.1.3) UNRELEASED; urgency=low * Improve the description for MAXCDS in the conf file. (Closes: #570028) * Export the CDNAME variable in the conf file. (Closes: #570470) + [ Steve McIntyre ] + * Cope with errors reported from debootstrap better; don't just treat + the text output as package names. Closes: #570474 + -- Frans Pop Sun, 23 Aug 2009 08:59:25 +0200 debian-cd (3.1.2) unstable; urgency=low diff --git a/tools/make_disc_trees.pl b/tools/make_disc_trees.pl index a60599e3..321f2d18 100755 --- a/tools/make_disc_trees.pl +++ b/tools/make_disc_trees.pl @@ -392,6 +392,8 @@ sub check_base_installable { my (%on_disc, %exclude); my $packages_file = "$cddir/dists/$codename/main/binary-$arch/Packages"; my $p; + my $db_error = 0; + my $error_string = ""; open (PLIST, $packages_file) || die "Can't open Packages file $packages_file : $!\n"; @@ -423,19 +425,30 @@ sub check_base_installable { open (DLIST, "debootstrap --arch $arch --print-debs $codename $tdir/debootstrap_tmp file:$mirror $debootstrap_script 2>/dev/null | tr ' ' '\n' |") || die "Can't fork debootstrap : $!\n"; while (defined($p = )) { + if ($p =~ m/^E:/) { + $db_error = 1; + } chomp $p; - if (length $p > 1) { - if (!defined($on_disc{$p})) { - if (defined($exclude{$p})) { - print LOG "Missing debootstrap-required $p but included in $ENV{'BASE_EXCLUDE'}\n"; - } else { - $ok++; - print LOG "Missing debootstrap-required $p\n"; - } - } - } - } - close DLIST; + if ($db_error) { + $error_string = "$error_string $p"; + } else { + if (length $p > 1) { + if (!defined($on_disc{$p})) { + if (defined($exclude{$p})) { + print LOG "Missing debootstrap-required $p but included in $ENV{'BASE_EXCLUDE'}\n"; + } else { + $ok++; + print LOG "Missing debootstrap-required $p\n"; + } + } + } + } + } + close DLIST; + if ($db_error) { + print LOG "Debootstrap reported error: $error_string\n"; + die "Debootstrap reported error: $error_string\n"; + } system("rm -rf $tdir/debootstrap_tmp"); return $ok; }