X-Git-Url: https://git.donarmstrong.com/?p=bugscan.git;a=blobdiff_plain;f=bugcounts;h=ac49f8c405e86748dbd36b03cbe9d03a0af8d752;hp=3051b19a9074df34c68b5c1ceed5f52d50a3ffa2;hb=HEAD;hpb=37c1a7189dec60183ce19b121afa2747f17dda68;ds=sidebyside diff --git a/bugcounts b/bugcounts index 3051b19..ac49f8c 100755 --- a/bugcounts +++ b/bugcounts @@ -1,13 +1,15 @@ #! /usr/bin/perl -# vim: ts=4 sw=4 nowrap +# vim: ts=8 sw=8 nowrap # Generate some counts for the bugreports use Getopt::Std; -require scanlib; -require bugcfg; +use File::Basename; +use lib dirname(__FILE__); +use bugcfg; +use scanlib; use strict; -use warnings; +# use warnings; my $Version = "BugCount 1.1\nCopyright (C) Wichert Akkerman \n"; my $statusfile = "status"; @@ -41,19 +43,18 @@ scanlib::readstatus($statusfile); my $total=0; # total number of bugs my $patchcount=0; # Number of bugs that have a fix proposed my $pendingcount=0; # Number of bugs that will have a fix uploaded RSN -my $ignorecount=0; # Number of bugs being ignored +my $ignorecount=0; # Number of bugs being ignored my $worrycount=0; # Number of bugs we're actually worried about - -for my $p (keys %scanlib::packagelist) { - next if (defined $bugcfg::exclude{$p}); - for my $nr (sort @{$scanlib::packagelist{$p}}) { - next if (defined $bugcfg::exclude{$nr}); - $total++; - $pendingcount++ if ($scanlib::bugs{$nr} =~ m/^\[[^]]*P/); - $patchcount++ if ($scanlib::bugs{$nr} =~ m/^\[[^]]*\+/); - $ignorecount++ if ($scanlib::bugs{$nr} =~ m/^\[[^]]*I/); - $worrycount++ if (scanlib::check_worry($scanlib::bugs{$nr})); - } +my $stablecount=0; # Number of bugs affecting stable + +for my $bug (values %scanlib::bugs) { + $total++; + $pendingcount++ if ($bug->{'pending'}); + $patchcount++ if ($bug->{'patch'}); + $ignorecount++ if ($bug->{$bugcfg::debian_releases->{stable}.'-ignore'} || + $bug->{$bugcfg::debian_releases->{testing}.'-ignore'}); + $worrycount++ if (scanlib::check_worry($bug)); + $stablecount++ if (scanlib::check_worry_stable($bug)); } -printf("%d %d %d 0 %d 0 %d\n", $total, $pendingcount, $patchcount, $ignorecount, $worrycount); +printf("%d %d %d 0 %d 0 %d %d\n", $total, $pendingcount, $patchcount, $ignorecount, $worrycount, $stablecount);