X-Git-Url: https://git.donarmstrong.com/?p=bugscan.git;a=blobdiff_plain;f=scanlib.pm;h=9171f8490b6289019edc9fd69a1b87c1a6f17680;hp=47f8baf642c8d18b5f081589a0c557341ee2f409;hb=HEAD;hpb=b1cb1dd16a9ae966b9f45e12f2aacde39958d17b diff --git a/scanlib.pm b/scanlib.pm index 47f8baf..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::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; } @@ -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 {