]> git.donarmstrong.com Git - bugscan.git/blobdiff - scanlib.pm
Small simplification.
[bugscan.git] / scanlib.pm
index a2c378b73913439ce72037904f29f30dd8371e34..0f64165b5a0ab7b649867e1fcc6e5fd1a14e534e 100644 (file)
@@ -1,5 +1,5 @@
 #! /usr/bin/perl
-# vim: ts=4 sw=4 nowrap
+# vim: ts=8 sw=8 nowrap
 #
 # General functions for scanning the BTS-database.
 # Based on bugscan, written by Richard Braakman <dark@debian.org>,
@@ -224,8 +224,8 @@ sub scanspooldir() {
                        next if !$affects_any;
                }
 
-               for my $keyword qw(pending patch help moreinfo unreproducible security upstream etch-ignore) {
-                       $bi->{$keyword} = ($bug->{'keywords'} =~ /\b$keyword\b/) ? 1 : 0;
+               for my $keyword qw(pending patch help moreinfo unreproducible security upstream sarge-ignore etch-ignore) {
+                       $bi->{$keyword} = grep(/^$keyword$/, @tags);
                }
 
                if (length($bug->{'mergedwith'})) {
@@ -322,7 +322,7 @@ sub check_worry {
 sub check_worry_stable {
        my ($bi) = @_;
 
-       return ($bi->{'stable'});
+       return ($bi->{'stable'} && !$bi->{'sarge-ignore'});
 }
 
 sub get_taginfo {
@@ -336,7 +336,7 @@ sub get_taginfo {
        $taginfo .= $bi->{'unreproducible'} ? "R" : " ";
        $taginfo .= $bi->{'security'}       ? "S" : " ";
        $taginfo .= $bi->{'upstream'}       ? "U" : " ";
-       $taginfo .= $bi->{'etch-ignore'}    ? "I" : " ";
+       $taginfo .= ($bi->{'sarge-ignore'} || $bi->{'etch-ignore'}) ? "I" : " ";
 
        return $taginfo;
 }