open CONT, "zcat $filename|$what"
or die $!;
- while (<CONT>) { last if /^FILE/mo; }
- if (eof(CONT)) { # no header found
+ my $header_found = 0;
+ while (<CONT>) { /^FILE/mo && do { $header_found = 1; last };}
+ if (eof(CONT)) { # no header found or only header found
close CONT; # explicit close to reset $.
+ next if $header_found;
open CONT, "zcat $filename|$what";
}
while (<CONT>) {
activate($filelist_db);
#FIXME: hardcoded archs. (debports has no contrib/non-free)
- if ($arch !~ m/^kfreebsd-.*$/) {
+ if ($arch ne 'avr32' and $arch ne 'm68k') {
system("ln", "-sf", basename($filelist_db),
"$DBDIR/filelists_${suite}_all.db") == 0
or die "Oops";