Better error messages when the config is missing or the mirror is incomplete.
This commit is contained in:
parent
c2bd5f1e8d
commit
979f6666f3
|
@ -19,6 +19,9 @@ EOF
|
|||
|
||||
my @common_excludes = read_exclude("exclude-udebs");
|
||||
|
||||
die "Missing \$MIRROR variable" unless $ENV{MIRROR};
|
||||
die "Missing \$DI_CODENAME variable" unless $ENV{DI_CODENAME};
|
||||
|
||||
foreach my $arch (@ARCHES) {
|
||||
(my $cpparch = $arch) =~ s/-/_/g;
|
||||
print OUT "#ifdef ARCH_$cpparch\n";
|
||||
|
@ -26,6 +29,10 @@ foreach my $arch (@ARCHES) {
|
|||
push @exclude, read_exclude("exclude-udebs-$arch")
|
||||
if -e exclude_path("exclude-udebs-$arch");
|
||||
my $packagefile="$ENV{MIRROR}/dists/$ENV{DI_CODENAME}/main/debian-installer/binary-$arch/Packages";
|
||||
unless (-f $packagefile) {
|
||||
print "Missing package file for arch $arch.\n";
|
||||
next;
|
||||
}
|
||||
UDEB: foreach my $udeb (map { chomp; $_ } `grep-dctrl -n -s Package '' $packagefile`) {
|
||||
foreach my $pattern (@exclude) {
|
||||
if ($udeb =~ /^$pattern$/) {
|
||||
|
|
Loading…
Reference in New Issue