X-Git-Url: https://git.deb.at/?p=deb%2Fpackages.git;a=blobdiff_plain;f=bin%2Fparse-contents;h=ef5c09ce2b4645395371392f5f3a732dd913cae6;hp=414dc8ac0a623c1f11e04154423881f033478cc7;hb=f7b85516f73e6a06d309e42be07c9f3def2877b5;hpb=e2881c2279414d845cb0b21b5e2661924194cb77 diff --git a/bin/parse-contents b/bin/parse-contents index 414dc8a..ef5c09c 100755 --- a/bin/parse-contents +++ b/bin/parse-contents @@ -82,13 +82,16 @@ for my $suite (@suites) { open CONT, "zcat $filename|$what" or die $!; - while () {last if /^FILE/mo;} - open CONT, "zcat $filename|$what" if eof(CONT); + while () { last if /^FILE/mo; } + if (eof(CONT)) { # no header found + close CONT; # explicit close to reset $. + open CONT, "zcat $filename|$what"; + } while () { my $data = ""; my %data = (); chomp; - print "Doing line ".($./1000)."k (out of approx 1.5M)\n" if $. % 250000 == 0; + print "Doing line ".($./1000)."k (out of approx 2.0M)\n" if $. % 250000 == 0; /^(.+?)\s+(\S+)$/o; my ($file, $value) = ($1, $2); $value =~ s#[^,/]+/##og; @@ -159,7 +162,7 @@ for my $suite (@suites) { my $lastpath = my $lastcasepath = my $lastfile = ""; my %matches = (); while () { - print "Doing line ".($./1000000)."M (out of approx. 16M)\n" + print "Doing line ".($./1000000)."M (out of approx. 20M)\n" if $. % 1000000 == 0; chomp; my @line = split /\0/o, $_;