]> git.donarmstrong.com Git - bugscan.git/blobdiff - scanlib.pm
Add non-free-firmware to the valid sections
[bugscan.git] / scanlib.pm
index 19fda963bf83e8ccd5a0e184d9cca54211893ec9..9171f8490b6289019edc9fd69a1b87c1a6f17680 100644 (file)
@@ -19,7 +19,7 @@ use Debbugs::MIME qw(decode_rfc1522 encode_rfc1522);
 use Debbugs::Packages;
 use Debbugs::Versions;
 use Debbugs::Status;
-use IO::Uncompress::AnyUncompress;
+use Debbugs::Common qw(open_compressed_file);
 use Fcntl qw(O_RDONLY);
 
 use File::Basename;
@@ -53,8 +53,11 @@ sub readmaintainers() {
 
 sub glob_compressed_fh {
     my ($fn) = @_;
-    $fn = (grep { -f $_ } glob $fn)[0];
-    my $fh = IO::Uncompress::AnyUncompress->new($fn) or
+    my @fn = grep { -f $_ } glob $fn;
+    if (not @fn) {
+       die "No files exist which match glob '$fn'";
+    }
+    my $fh = Debbugs::Common::open_compressed_file($fn[0]) or
         die "Unable to open $fn for reading: $!";
     return $fh;
 }
@@ -327,15 +330,20 @@ sub wwwname {
 }
 
 sub check_worry {
-       my ($bi) = @_;
+       my ($bi,$dist) = @_;
+    $dist = 'testing' if not defined $dist;
 
-       return ($bi->{'testing'} && !$bi->{$bugcfg::debian_releases->{testing}.'-ignore'});
+       return ($bi->{$dist} && !$bi->{$bugcfg::debian_releases->{$dist}.'-ignore'});
 }
 
+sub check_worry_testing {
+    return check_worry($_[0],'testing');
+}
 sub check_worry_stable {
-       my ($bi) = @_;
-
-       return ($bi->{'stable'} && !$bi->{$bugcfg::debian_releases->{stable}.'-ignore'});
+    return check_worry($_[0],'stable');
+}
+sub check_worry_oldstable {
+    return check_worry($_[0],'oldstable');
 }
 
 sub check_worry_unstable {