$debian_sources = $config{package_source};
$pseudolist = $config{pseudo_desc_file};
-$debian_sources = "/etc/debbugs/indices/ftp.sources";
-
-$debian_ftproot = "/org/bugs.debian.org/etc/indices/ftp/testing";
-
+# this is just the default, and should always be overriden by the
+# Debbugs::Config; set values
+our $debian_releases = {testing => 'jessie',
+ stable => 'wheezy',
+ unstable => 'sid',
+ oldstable => 'squeeze',
+ };
+# figure out debian releases from distribution aliases
+for my $alias (keys %{$config{distribution_aliases}//{}}) {
+ next if $alias eq $config{distribution_aliases}{$alias};
+ $debian_releases->{$config{distribution_aliases}{$alias}} =
+ $alias;
+}
# check out:
# http://release.debian.org/wheezy/arch_qualify.html
$total++;
$pendingcount++ if ($bug->{'pending'});
$patchcount++ if ($bug->{'patch'});
- $ignorecount++ if ($bug->{'wheezy-ignore'} || $bug->{'jessie-ignore'});
+ $ignorecount++ if ($bug->{$debian_releases->{stable}.'-ignore'} ||
+ $bug->{$debian_releases->{testing}.'-ignore'});
$worrycount++ if (scanlib::check_worry($bug));
$stablecount++ if (scanlib::check_worry_stable($bug));
}
} elsif ($scanlib::bugs{$nr}->{'help'}) {
print '<span style="color: #ffaa30">';
}
- print "<strike>" if ($scanlib::bugs{$nr}->{'wheezy-ignore'} || $scanlib::bugs{$nr}->{'jessie-ignore'});
+ print "<strike>" if ($scanlib::bugs{$nr}->{$bugcfg::debian_releases->{stable}.'-ignore'} || $scanlib::bugs{$nr}->{$bugcfg::debian_releases->{testing}.'-ignore'});
print "<em class=\"worry\">" if $worry;
($sect=$nr) =~ s/([0-9]{2}).*/$1/;
printf "<A NAME=\"$nr\"></A> %s [%s] [%s] %s\n", scanlib::wwwnumber($nr),
scanlib::get_relinfo($scanlib::bugs{$nr}),
scanlib::htmlsanit($scanlib::bugs{$nr}->{'subject'});
print "</em>" if $worry;
- print "</strike>" if ($scanlib::bugs{$nr}->{'wheezy-ignore'} || $scanlib::bugs{$nr}->{'jessie-ignore'});
+ print "</strike>" if ($scanlib::bugs{$nr}->{$bugcfg::debian_releases->{stable}.'-ignore'} || $scanlib::bugs{$nr}->{$bugcfg::debian_releases->{testing}.'-ignore'});
} else {
printf(" %-6d [%s] [%s] %s\n", $nr, scanlib::get_taginfo($scanlib::bugs{$nr}),
scanlib::get_relinfo($scanlib::bugs{$nr}), $scanlib::bugs{$nr}->{'subject'});
$seen_bugs{$nr} = 1;
$pendingtotal++ if ($scanlib::bugs{$nr}->{'pending'});
$patchtotal++ if ($scanlib::bugs{$nr}->{'patch'});
- $ignoretotal++ if ($scanlib::bugs{$nr}->{'wheezy-ignore'} || $scanlib::bugs{$nr}->{'jessie-ignore'});
+ $ignoretotal++ if ($scanlib::bugs{$nr}->{$bugcfg::debian_releases->{stable}.'-ignore'} || $scanlib::bugs{$nr}->{$bugcfg::debian_releases->{testing}.'-ignore'});
$worrytotal++ if (scanlib::check_worry($scanlib::bugs{$nr}));
$stabletotal++ if (scanlib::check_worry_stable($scanlib::bugs{$nr}));
# 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->{'wheezy-ignore'}) {
+ if (scanlib::check_worry_unstable($bug) and not $bug->{$bugcfg::debian_releases->{testing}.'-ignore'}) {
push @{$unstablebugs{$package}}, $nr;
}
if (scanlib::check_worry($bug)) {
}
next if $skip==1;
- my %disttags = ();
- $disttags{'oldstable'} = grep(/^squeeze$/, @tags);
- $disttags{'stable'} = grep(/^wheezy$/, @tags);
- $disttags{'testing'} = grep(/^jessie$/, @tags);
- $disttags{'unstable'} = grep(/^sid$/, @tags);
+ my %disttags = ();
+ for (qw(unstable stable testing unstable)) {
+ $disttags{$_} = grep(/^$bug_cfg::debian_releases->{$_}$/, @tags);
+ }
$disttags{'experimental'} = grep(/^experimental$/, @tags);
# default according to vorlon 2007-06-17
next if !$affects_any;
}
- for my $keyword (qw(pending patch help moreinfo unreproducible security upstream squeeze-ignore wheezy-ignore jessie-ignore)) {
+ for my $keyword (qw(pending patch help moreinfo unreproducible security upstream),
+ map {$_.$bug_cfg::debian_releases->{testing}.'-ignore'} keys %{$bug_cfg::debian_releases}) {
$bi->{$keyword} = grep(/^$keyword$/, @tags);
}
sub check_worry {
my ($bi) = @_;
- return ($bi->{'testing'} && !$bi->{'jessie-ignore'});
+ return ($bi->{'testing'} && !$bi->{$bug_cfg::debian_releases->{testing}.'-ignore'});
}
sub check_worry_stable {
my ($bi) = @_;
- return ($bi->{'stable'} && !$bi->{'wheezy-ignore'});
+ return ($bi->{'stable'} && !$bi->{$bug_cfg::debian_releases->{stable}.'-ignore'});
}
sub check_worry_unstable {
$taginfo .= $bi->{'unreproducible'} ? "R" : " ";
$taginfo .= $bi->{'security'} ? "S" : " ";
$taginfo .= $bi->{'upstream'} ? "U" : " ";
- $taginfo .= ($bi->{'wheezy-ignore'} || $bi->{'jessie-ignore'}) ? "I" : " ";
+ $taginfo .= ($bi->{$bug_cfg::debian_releases->{stable}.'-ignore'} || $bi->{$bug_cfg::debian_releases->{testing}.'-ignore'}) ? "I" : " ";
return $taginfo;
}