X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scanlib.pm;h=9171f8490b6289019edc9fd69a1b87c1a6f17680;hb=f989dc4f79d4e60a8d99f8473db2a3846d1ffcd3;hp=bb9d170e5d47b8357c5c93739b21afd664b8be5d;hpb=64d8c09bb191cc7695acacdb848df6cf64e478e4;p=bugscan.git
diff --git a/scanlib.pm b/scanlib.pm
index bb9d170..9171f84 100644
--- a/scanlib.pm
+++ b/scanlib.pm
@@ -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::Uncopmress::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;
}
@@ -312,14 +315,14 @@ sub htmlsanit {
return $in;
}
-sub wwwnumber() {
+sub wwwnumber {
my $number = shift; # Number of bug to html-ize
"' . htmlsanit($number) . '';
}
-sub wwwname() {
+sub wwwname {
my $name = shift; # Name of package
"{'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 {