- next if (defined $scanlib::exclude{$p});
- for my $nr (split(/ /, $scanlib::packagelist{$p})) {
- $pendingtotal++ if ($scanlib::bugs{$nr} =~ m/^\[[^]]*P/);
- $patchtotal++ if ($scanlib::bugs{$nr} =~ m/^\[[^]]*\+/);
- $ignoretotal++ if ($scanlib::bugs{$nr} =~ m/^\[[^]]*I/);
- $nottestingtotal++ if ($scanlib::bugs{$nr} =~ m/ \[[^]]*X/);
- $worrytotal++ unless (
- $scanlib::bugs{$nr} =~ m/^\[[^]]*I/ or
- $scanlib::bugs{$nr} =~ m/ \[[^]]*X/ or
- ($scanlib::bugs{$nr} =~ m/ \[[^]]*[OSUE]/ and $scanlib::bugs{$nr} !~ m/ \[[^]]*T/));
-
- if (not defined($scanlib::exclude{$nr})) {
- $bugcount++;
- $count++;
- }
+ for my $nr (@{$scanlib::packagelist{$p}}) {
+ # if we've already counted this bug, we don't want to count it again
+ next if $seen_bugs{$nr};
+ $seen_bugs{$nr} = 1;
+ $pendingtotal++ if ($scanlib::bugs{$nr}->{'pending'});
+ $patchtotal++ if ($scanlib::bugs{$nr}->{'patch'});
+ $ignoretotal++ if ($scanlib::bugs{$nr}->{$bugcfg::debian_releases->{stable}.'-ignore'} || $scanlib::bugs{$nr}->{$bugcfg::debian_releases->{testing}.'-ignore'});
+ $worrytotal++ if (scanlib::check_worry($scanlib::bugs{$nr}));
+ $stabletotal++ if (scanlib::check_worry_stable($scanlib::bugs{$nr}));
+
+ $bugcount++;
+ $count++;