The following commit has been merged in the ubuntu-master branch:
commit 423d06ae0e7bc1609a0aa1e8bbc2b4dfe93a62de
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date: Tue Jun 10 22:29:10 2008 +0100
[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.
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 (<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>) {
--
APT Archive Web-Frontend (Alioth repository)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]