From 423d06ae0e7bc1609a0aa1e8bbc2b4dfe93a62de Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 10 Jun 2008 22:29:10 +0100 Subject: [PATCH] [UBUNTU] Handle empty Contents files with headers gracefully The Contents files for dapper currently have headers but no actual content. Handle this case without spewing out a lot of warnings. --- bin/parse-contents | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/parse-contents b/bin/parse-contents index 82df0b8..1f4f58d 100755 --- a/bin/parse-contents +++ b/bin/parse-contents @@ -85,9 +85,11 @@ for my $suite (@suites) { open CONT, "zcat $filename|$what" or die $!; - while () { last if /^FILE/mo; } - if (eof(CONT)) { # no header found + my $header_found = 0; + while () { /^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 () { -- 2.39.2