X-Git-Url: https://git.donarmstrong.com/?p=bugscan.git;a=blobdiff_plain;f=bugcounts;h=b0337fc01d7f68a7c88f605e54cafc3de4f3d7f6;hp=6d93fa8b21193707997095a5d39bd126a659a92c;hb=1d48352df6dd715ee357af799781e5a5b1439190;hpb=2eb9a472e6480397fdaf64d005dfcc555be32d85 diff --git a/bugcounts b/bugcounts index 6d93fa8..b0337fc 100755 --- a/bugcounts +++ b/bugcounts @@ -31,7 +31,7 @@ EOF exit 0; } -my ($opt_h,$opt_V,$opt_S,$opt_C); +our ($opt_h,$opt_V,$opt_S,$opt_C); getopts('VhS:C:'); ShowUsage if ($opt_h); @@ -53,7 +53,7 @@ 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/); @@ -64,17 +64,11 @@ for my $p (keys %scanlib::packagelist) { 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"; - } + $worrycount++ if (scanlib::check_worry($scanlib::bugs{$nr})); } if (defined($scanlib::comments{$p}) && $scanlib::comments{$p} =~ m/^\[REMOVE\]/) { - my @a = split(/ /,$scanlib::packagelist{$p}); - $removecount += scalar(@a); + $removecount += scalar @{$scanlib::packagelist{$p}}; } }