-
- for $package (split /[,\s]+/, $s_package) {
- $_= $package; y/A-Z/a-z/; $_= $` if m/[^-+._a-z0-9]/;
- if (not defined $section{$_}) {
- if (defined $debbugssection{$_}) {
- $relinfo .= "X";
- } else {
- next; # Skip unavailable packages
+
+ if (defined($section{$bug->{'package'}}) && $section{$bug->{'package'}} eq 'pseudo') {
+ # versioning information makes no sense for pseudo packages,
+ # just use the tags
+ for my $dist (qw(oldstable stable testing unstable experimental)) {
+ $bi->{$dist} = $disttags{$dist};
+ }
+ next if (length($bug->{'done'}));
+ } else {
+ my $affects_any = 0;
+
+ # only bother to check the versioning status for the distributions indicated by the tags
+ for my $dist (qw(oldstable stable testing unstable experimental)) {
+ local $SIG{__WARN__} = sub {};
+
+ $bi->{$dist} = 0;
+ next if (!$disttags{$dist});
+
+ my $presence = Debbugs::Status::bug_presence(
+ bug => $f,
+ status => $bug,
+ dist => $dist,
+ arch => \@archs_with_source
+ );
+
+ # ignore bugs that are absent/fixed in this distribution, include everything
+ # else (that is, "found" which says that the bug is present, and undef, which
+ # indicates that no versioning information is present and it's not closed
+ # unversioned)
+ if (!defined($presence) || ($presence ne 'absent' && $presence ne 'fixed')) {
+ $bi->{$dist} = 1;
+ $affects_any = 1;