- my $bug; # Number of current bug
- my $subject; # Subject for current bug
- my $pkg; # Name of current package
- my $file; # Name of statusfile
- my $sect; # Section of current package
- my $mnt; # Maintainer of current package
-
- $file=shift;
- open(P, $file) or die "open $file: $!";
- while (<P>) {
- chomp;
- if (m/^[0-9]+ \[/) {
- ($bug,$subject)=split(/ /, $_, 2);
- $bugs{$bug}=$subject;
- push @{$packagelist{$pkg}}, $bug;
- } else {
- ($pkg,$sect, $mnt)=split(/ /, $_, 3);
- next if (!defined($pkg));
- $section{$pkg}=$sect;
- $maintainer{$pkg}=$mnt;
+ my $filename = shift;
+ open STATUS, "<", $filename
+ or die "$filename: $!";
+
+ while (1) {
+ chomp (my $type = <STATUS>);
+ if ($type eq 'package') {
+ chomp (my $package = <STATUS>);
+ chomp (my $section = <STATUS>);
+ chomp (my $maintainer = <STATUS>);
+ my $blank = <STATUS>;
+
+ $section{$package} = $section;
+ $maintainer{$package} = $maintainer;