X-Git-Url: https://git.donarmstrong.com/?p=bugscan.git;a=blobdiff_plain;f=bugcounts;h=4c2200533232dddbf03e1dba35790b7745796bd4;hp=6d93fa8b21193707997095a5d39bd126a659a92c;hb=4ef8564c7e87c67015de727dbf9bd23a51f927d3;hpb=2eb9a472e6480397fdaf64d005dfcc555be32d85 diff --git a/bugcounts b/bugcounts index 6d93fa8..4c22005 100755 --- a/bugcounts +++ b/bugcounts @@ -11,7 +11,6 @@ use warnings; my $Version = "BugCount 1.1\nCopyright (C) Wichert Akkerman \n"; my $statusfile = "status"; -my $commentsfile = "comments"; sub ShowVersion() { print "$Version\n"; @@ -26,56 +25,37 @@ Options: -V show version -h show some (hopefully) helpfull information -S use different statusfile - -C use different commentsfile EOF exit 0; } -my ($opt_h,$opt_V,$opt_S,$opt_C); +our ($opt_h,$opt_V,$opt_S); -getopts('VhS:C:'); +getopts('VhS:'); ShowUsage if ($opt_h); ShowVersion if ($opt_V); $statusfile=$opt_S if ($opt_S); -$commentsfile=$opt_C if ($opt_C); scanlib::readstatus($statusfile); -scanlib::readcomments($commentsfile); my $total=0; # total number of bugs -my $removecount=0; # Number of bugs that will disappear if packages are removed 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 $nottestingcount=0; # Number of bugs on packages not in testing my $worrycount=0; # Number of bugs we're actually worried about -my %sectcount=(); # Bugs per type for my $p (keys %scanlib::packagelist) { next if (defined $bugcfg::exclude{$p}); - for my $nr (sort split(/ /, $scanlib::packagelist{$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/); $nottestingcount++ if ($scanlib::bugs{$nr} =~ m/ \[[^]]*X/); - if (defined $scanlib::comments{$nr}) { - my $sect = ($scanlib::comments{$nr} =~ m/\[([^]]*)\]/); - $sectcount{$sect}++; - } - unless ($scanlib::bugs{$nr} =~ m/^\[[^]]*I/ or - $scanlib::bugs{$nr} =~ m/ \[[^]]*X/ or - ($scanlib::bugs{$nr} =~ m/ \[[^]]*[OSUE]/ and $scanlib::bugs{$nr} !~ m/ \[[^]]*T/)) { - $worrycount++; - # print STDERR "$nr $bugs{$nr}\n"; - } - } - - if (defined($scanlib::comments{$p}) && $scanlib::comments{$p} =~ m/^\[REMOVE\]/) { - my @a = split(/ /,$scanlib::packagelist{$p}); - $removecount += scalar(@a); + $worrycount++ if (scanlib::check_worry($scanlib::bugs{$nr})); } } -printf("%d %d %d %d %d %d %d\n", $total, $pendingcount, $patchcount, $removecount, $ignorecount, $nottestingcount, $worrycount); +printf("%d %d %d 0 %d %d %d\n", $total, $pendingcount, $patchcount, $ignorecount, $nottestingcount, $worrycount);