use Deb::Versions;
use Packages::Config qw( $DBDIR $ROOT $TEMPLATEDIR $CACHEDIR
@SUITES @SECTIONS @ARCHIVES @ARCHITECTURES @PRIORITIES
use Deb::Versions;
use Packages::Config qw( $DBDIR $ROOT $TEMPLATEDIR $CACHEDIR
@SUITES @SECTIONS @ARCHIVES @ARCHITECTURES @PRIORITIES
my ($cgi, $params_set, $key, $val) = @_;
debug("set_param_once key=$key val=$val",4) if DEBUG;
if ($params_set->{$key}++) {
my ($cgi, $params_set, $key, $val) = @_;
debug("set_param_once key=$key val=$val",4) if DEBUG;
if ($params_set->{$key}++) {
set_param_once( $input, \%params_set, 'suite', $s);
} elsif (!$need_pkg && $SECTIONS{$_}) {
set_param_once( $input, \%params_set, 'section', $_);
set_param_once( $input, \%params_set, 'suite', $s);
} elsif (!$need_pkg && $SECTIONS{$_}) {
set_param_once( $input, \%params_set, 'section', $_);
} elsif (!$need_pkg && $sections_descs{$_}) {
set_param_once( $input, \%params_set, 'subsection', $_);
} elsif (!$need_pkg && ($_ eq 'source')) {
} elsif (!$need_pkg && $sections_descs{$_}) {
set_param_once( $input, \%params_set, 'subsection', $_);
} elsif (!$need_pkg && ($_ eq 'source')) {
} elsif ($ARCHITECTURES{$_}) {
set_param_once( $input, \%params_set, 'arch', $_)
unless $_ eq 'any';
} elsif ($ARCHITECTURES{$_}) {
set_param_once( $input, \%params_set, 'arch', $_)
unless $_ eq 'any';
} elsif ($PRIORITIES{$_}) {
set_param_once( $input, \%params_set, 'priority', $_);
} else {
} elsif ($PRIORITIES{$_}) {
set_param_once( $input, \%params_set, 'priority', $_);
} else {
replace => { all => \@ARCHIVES,
default => \@ARCHIVES} },
exact => { default => 0, match => '^(\w+)$', },
replace => { all => \@ARCHIVES,
default => \@ARCHIVES} },
exact => { default => 0, match => '^(\w+)$', },
- lang => { default => $http_lang, match => '^(\w+)$', },
+ lang => { default => $http_lang, match => '^([\w-]+)$', },
source => { default => 0, match => '^(\d+)$', },
debug => { default => 0, match => '^(\d+)$', },
searchon => { default => 'names', match => '^(\w+)$', },
source => { default => 0, match => '^(\d+)$', },
debug => { default => 0, match => '^(\d+)$', },
searchon => { default => 'names', match => '^(\w+)$', },
- my $cat = Packages::I18N::Locale->get_handle( $opts{lang} )
- or die "get_handle failed";
+ my $cat = Packages::I18N::Locale->get_handle( $opts{lang}, "en" )
+ or die "get_handle failed for $opts{lang}";
+ $opts{cat} = $cat;
#FIXME: ugly hack
unless (($what_to_do eq 'allpackages' and $opts{format} =~ /^(html|txt\.gz)/)
|| -e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {
#FIXME: ugly hack
unless (($what_to_do eq 'allpackages' and $opts{format} =~ /^(html|txt\.gz)/)
|| -e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {