]> git.donarmstrong.com Git - bugscan.git/blobdiff - scanlib.pm
Adjust to the now-official bug presence code.
[bugscan.git] / scanlib.pm
index b207b14fd17f8ea65bd7648f870a1d31b6ba207a..8ef9b6726244500f54e9bb1917ea95d5688661e4 100644 (file)
@@ -14,8 +14,7 @@
 #   %packagelist    - map from packagename to bugreports
 #   %NMU            - map with NMU information
 
-#use lib qw(/org/bugs.debian.org/perl/);
-use lib qw(/home/sesse/debbugs);
+use lib qw(/org/bugs.debian.org/perl);
 use LWP::UserAgent;
 use Debbugs::MIME qw(decode_rfc1522 encode_rfc1522);
 use Debbugs::Packages;
@@ -227,8 +226,16 @@ sub scanspooldir() {
                # only bother to check the versioning status for the distributions indicated by the tags 
                my $relinfo = "";
                for my $dist qw(oldstable stable testing unstable experimental) {
+                       local $SIG{__WARN__} = sub {};
+
                        next if (!$disttags{$dist});
-                       if (Debbugs::Status::check_bug_presence(bug => $f, status => $bug, dist => $dist) eq 'pending') {
+                       my $presence = Debbugs::Status::bug_presence(bug => $f, status => $bug, dist => $dist);
+
+                       # 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')) {
                                $relinfo .= uc(substr($dist, 0, 1));
                        }
                }