- grep(s/\.status$//,@list);
- @list= sort { $a <=> $b } @list;
-
- #process each bug (ie, status file)
- while ( defined( $list[0] ))
- {
- my $ref = shift @list;
- print STDERR "$ref considering\n" if $debug;
- readreport($ref, $path);
- printf IDXFILE "%s %d %s\n", $data->{package}, $ref, $data->{subject};
- }
+ grep(s/\.summary$//,@list);
+ push @files, @list;
+}
+
+@files = sort { $a <=> $b } @files;
+
+#process each bug (ie, status file)
+for my $ref (@files)
+{
+ print STDERR "$ref considering\n" if $debug;
+ my $data = readbug($ref, $archive);
+ $data->{severity} =~ y/A-Z/a-z/;
+
+ (my $pkglist = $data->{package}) =~ s/[,\s]+/,/g;
+ $pkglist =~ s/^,+//;
+ $pkglist =~ s/,+$//;
+
+ my $whendone = 'open';
+ $whendone = 'forwarded' if length $data->{forwarded};
+ $whendone = 'done' if length $data->{done};
+
+ printf IDXFILE "%s %d %d %s [%s] %s %s\n",
+ $pkglist, $ref, $data->{date}, $whendone, $data->{originator},
+ $data->{severity}, $data->{keywords};