2 # vim: ts=8 sw=8 nowrap
4 # Generate some counts for the bugreports
12 my $Version = "BugCount 1.1\nCopyright (C) Wichert Akkerman <wakkerma\@debian.org>\n";
13 my $statusfile = "status";
23 $0 [-V] [-h] [-S file] [-C file]
26 -h show some (hopefully) helpfull information
27 -S use different statusfile
32 our ($opt_h,$opt_V,$opt_S);
35 ShowUsage if ($opt_h);
36 ShowVersion if ($opt_V);
37 $statusfile=$opt_S if ($opt_S);
39 scanlib::readstatus($statusfile);
41 my $total=0; # total number of bugs
42 my $patchcount=0; # Number of bugs that have a fix proposed
43 my $pendingcount=0; # Number of bugs that will have a fix uploaded RSN
44 my $ignorecount=0; # Number of bugs being ignored
45 my $worrycount=0; # Number of bugs we're actually worried about
46 my $stablecount=0; # Number of bugs affecting stable
48 for my $bug (values %scanlib::bugs) {
50 $pendingcount++ if ($bug->{'pending'});
51 $patchcount++ if ($bug->{'patch'});
52 $ignorecount++ if ($bug->{$bugcfg::debian_releases->{stable}.'-ignore'} ||
53 $bug->{$bugcfg::debian_releases->{testing}.'-ignore'});
54 $worrycount++ if (scanlib::check_worry($bug));
55 $stablecount++ if (scanlib::check_worry_stable($bug));
58 printf("%d %d %d 0 %d 0 %d %d\n", $total, $pendingcount, $patchcount, $ignorecount, $worrycount, $stablecount);