]> git.deb.at Git - deb/packages.git/blobdiff - bin/parse-contents
Merge branch 'master' into ubuntu-master
[deb/packages.git] / bin / parse-contents
index ab7df273fb3a20f16fd4e483712bbbcd82836324..959b6101b8e8e9478a11dd3222e886ecf1904f62 100755 (executable)
@@ -47,7 +47,7 @@ my @archives = @ARCHIVES;
 my @suites = @SUITES;
 my @archs = @ARCHITECTURES;
 my %deborts_hash;
-@deborts_hash{qw( avr32 m68k powerpcspe sh4 sparc64 )} = ();
+@deborts_hash{qw( alpha avr32 hppa m68k powerpcspe sh4 sparc64 )} = ();
 
 $DBDIR .= "/contents";
 mkdirp( $DBDIR );
@@ -87,9 +87,11 @@ for my $suite (@suites) {
 
                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>) {