* Cope with errors reported from debootstrap better; don't just treat
the text output as package names. Closes: #570474
This commit is contained in:
parent
38423b9daa
commit
599ee0710b
|
@ -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 <fjp@debian.org> Sun, 23 Aug 2009 08:59:25 +0200
|
||||
|
||||
debian-cd (3.1.2) unstable; urgency=low
|
||||
|
|
|
@ -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 = <DLIST>)) {
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue