]> git.deb.at Git - deb/packages.git/blobdiff - bin/parse-contents
Merge branch 'master' into ubuntu-master
[deb/packages.git] / bin / parse-contents
index 16bc7e497f7e9bf25daf0b5c5337415279fd7cff..959b6101b8e8e9478a11dd3222e886ecf1904f62 100755 (executable)
@@ -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>) {