# Generate a report britney can use
use Getopt::Std;
-require scanlib;
-require bugcfg;
+use File::Basename;
+use lib dirname(__FILE__);
+use bugcfg;
+use scanlib;
use strict;
# use warnings;
while (my ($nr, $bug) = each %scanlib::bugs) {
for my $package (split /[,\s]+/, $bug->{'package'}) {
$package =~ y/A-Z/a-z/;
- $package = $` if ($package =~ /[^-+._a-z0-9]/);
+ $package = $` if ($package =~ /[^-+._:a-z0-9]/);
# this hack is specific to britney counts, and ignores
# bugs tagged ignore for the next testing release
- if (scanlib::check_worry_unstable($bug) and not $bug->{'lenny-ignore'}) {
+ if (scanlib::check_worry_unstable($bug) and not $bug->{$bugcfg::debian_releases->{testing}.'-ignore'}) {
push @{$unstablebugs{$package}}, $nr;
}
if (scanlib::check_worry($bug)) {
print TESTING "$pkg ", scalar @{$testingbugs{$pkg}}, "\n";
print TESTINGNR "$pkg ", join(',', @{$testingbugs{$pkg}}), "\n";
}
-close TESTING;
-close TESTINGNR;
+close TESTING
+ or die "close britney/testing.new: $!";
+close TESTINGNR
+ or die "close britney/testing-nr.new: $!";
open UNSTABLE, ">", "britney/unstable.new"
or die "britney/unstable.new: $!";
print UNSTABLE "$pkg ", scalar @{$unstablebugs{$pkg}}, "\n";
print UNSTABLENR "$pkg ", join(',', @{$unstablebugs{$pkg}}), "\n";
}
-close UNSTABLE;
-close UNSTABLENR;
+close UNSTABLE
+ or die "close britney/unstable.new: $!";
+close UNSTABLENR
+ or die "close britney/unstable-nr.new: $!";
rename "britney/testing.new", "britney/testing"
or die "renaming britney/testing.new to britney/testing: $!";