my %params_set;
sub set_param_once {
my ($cgi, $params_set, $key, $val) = @_;
+ debug("set_param_once key=$key val=$val",4) if DEBUG;
if ($params_set->{$key}++) {
fatal_error( sprintf( _g( "%s set more than once in path" ), $key ) );
} else {
foreach (reverse @components) {
$need_pkg = !@pkg
&& ($what_to_do !~ /^(index|allpackages|newpkg)$/);
+ debug("need_pkg=$need_pkg component=$_",4) if DEBUG;
if (!$need_pkg && $SUITES{$_}) {
set_param_once( $input, \%params_set, 'suite', $_);
} elsif (!$need_pkg && (my $s = $SUITES_ALIAS{$_})) {
set_param_once( $input, \%params_set, 'archive', $_);
} elsif (!$need_pkg && $sections_descs{$_}) {
set_param_once( $input, \%params_set, 'subsection', $_);
+ } elsif (!$need_pkg && ($_ eq 'non-us')) { # non-US hack
+ set_param_once( $input, \%params_set, 'subsection', 'non-US');
} elsif (!$need_pkg && ($_ eq 'source')) {
set_param_once( $input, \%params_set, 'source', 1);
} elsif ($ARCHITECTURES{$_}) {
#
polangs="de fi nl fr uk"
ddtplangs="de cs da eo es fi fr hu it ja nl pl pt_BR pt_PT ru sk sv_SE uk"
-archives="us non-US security amd64 kfreebsd"
+archives="us non-US security amd64 kfreebsd backports volatile"
sections="main contrib non-free"
parts="$sections"
suites="oldstable stable stable-volatile stable-backports testing unstable experimental"
dists="$suites"
-architectures="alpha amd64 arm hppa hurd-i386 i386 ia64 kfreebsd-i386 m68k mips mipsel powerpc s390 sparc"
+architectures="alpha amd64 arm hppa hurd-i386 i386 ia64 kfreebsd-i386 kfreebsd-amd64 m68k mips mipsel powerpc s390 sparc"
arch_oldstable="alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc"
arch_stable="${arch_oldstable} amd64"
arch_testing="${arch_stable}"
-arch_unstable="${arch_stable} hurd-i386 kfreebsd-i386"
+arch_unstable="${arch_stable} hurd-i386 kfreebsd-i386 kfreebsd-amd64"
arch_experimental="${arch_unstable}"
arch_testing_proposed_updates="${arch_testing}"
arch_stable_proposed_updates="${arch_stable}"
for part in ${parts}
do
echo retrieve Packages $dist-backports/$part/$arch
- test -d us/${dist}-backports/${part}/binary-${arch} || mkdir -p us/${dist}-backports/${part}/binary-${arch}
- (cd us/${dist}-backports/${part}/binary-${arch} &&
+ test -d backports/${dist}-backports/${part}/binary-${arch} || mkdir -p backports/${dist}-backports/${part}/binary-${arch}
+ (cd backports/${dist}-backports/${part}/binary-${arch} &&
wget -q -N ${backports_ftpsite}/dists/sarge-backports/${part}/binary-${arch}/Packages.gz)
done
echo retrieve Contents $dist-backports/$arch
- (cd us/${dist}-backports &&
+ (cd backports/${dist}-backports &&
wget -q -N ${backports_ftpsite}/dists/sarge-backports/Contents-${arch}.gz)
done
for part in ${parts}
do
echo retrieve Sources $dist-backports/$part
- test -d us/${dist}-backports/${part}/source || mkdir -p us/${dist}-backports/${part}/source
- (cd us/${dist}-backports/${part}/source &&
+ test -d backports/${dist}-backports/${part}/source || mkdir -p backports/${dist}-backports/${part}/source
+ (cd backports/${dist}-backports/${part}/source &&
wget -q -N ${backports_ftpsite}/dists/sarge-backports/${part}/source/Sources.gz)
done
done
# Main archive
#
-arch=kfreebsd-i386
+architectures="kfreebsd-i386 kfreebsd-amd64"
-for dist in unstable experimental
+for arch in $architectures
do
- for part in ${parts} main/debian-installer
+ for dist in unstable experimental
do
- echo retrieve Packages $dist/$part/$arch
- test -d kfreebsd/${dist}/${part}/binary-${arch} || mkdir -p kfreebsd/${dist}/${part}/binary-${arch}
- (cd kfreebsd/${dist}/${part}/binary-${arch} &&
- wget -q -N ${kfreebsd_ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
+ for part in ${parts} main/debian-installer
+ do
+ echo retrieve Packages $dist/$part/$arch
+ test -d kfreebsd/${dist}/${part}/binary-${arch} || mkdir -p kfreebsd/${dist}/${part}/binary-${arch}
+ (cd kfreebsd/${dist}/${part}/binary-${arch} &&
+ wget -q -N ${kfreebsd_ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
+ done
+ echo retrieve Contents $dist/$arch
+ (cd kfreebsd/${dist} &&
+ wget -q -N ${kfreebsd_ftpsite}/dists/${dist}/Contents-${arch}.gz)
done
- echo retrieve Contents $dist/$arch
- (cd kfreebsd/${dist} &&
- wget -q -N ${kfreebsd_ftpsite}/dists/${dist}/Contents-${arch}.gz)
done
-
for part in ${parts}
do
echo retrieve Packages $dist-volatile/$part/$arch
- test -d us/${dist}-volatile/${part}/binary-${arch} || mkdir -p us/${dist}-volatile/${part}/binary-${arch}
- (cd us/${dist}-volatile/${part}/binary-${arch} &&
+ test -d volatile/${dist}-volatile/${part}/binary-${arch} || mkdir -p volatile/${dist}-volatile/${part}/binary-${arch}
+ (cd volatile/${dist}-volatile/${part}/binary-${arch} &&
wget -q -N ${volatile_ftpsite}/dists/${dist}/volatile/${part}/binary-${arch}/Packages.gz)
done
done
for part in ${parts}
do
echo retrieve Sources $dist-volatile/$part
- test -d us/${dist}-volatile/${part}/source || mkdir -p us/${dist}-volatile/${part}/source
- (cd us/${dist}-volatile/$part/source &&
+ test -d volatile/${dist}-volatile/${part}/source || mkdir -p volatile/${dist}-volatile/${part}/source
+ (cd volatile/${dist}-volatile/$part/source &&
wget -q -N ${volatile_ftpsite}/dists/${dist}/volatile/${part}/source/Sources.gz)
done
done
$$page_content .= '<p>'._g( 'Note that GNU/kFreeBSD is not officialy included in the Debian archive yet, but the GNU/kFreeBSD porter group keeps their archive in sync with the official archive as close as possible. See the <a href="http://www.debian.org/ports/kfreebsd-gnu/">GNU/kFreeBSD ports page</a> for current information.' ).'</p>';
} elsif ($archive eq 'non-US') {
+ $$page_content .= '<div class="cardleft">';
$$page_content .= print_links( _g( "North America" ), $file, @nonus_north_american_sites );
- $$page_content .= print_links( _g( "Europe" ), $file, @nonus_european_sites );
$$page_content .= print_links( _g( "Australia and New Zealand" ), $file,
@nonus_australian_sites );
$$page_content .= print_links( _g( "Asia" ), $file, @nonus_asian_sites );
$$page_content .= print_links( _g( "South America" ), $file, @nonus_south_american_sites );
-
- $$page_content .= '<p>'.sprintf( _g('If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.' ), 'http://www.debian.org/mirror/list-non-US' ).'</p>';
+ $$page_content .= '</div><div class="cardright">';
+ $$page_content .= print_links( _g( "Europe" ), $file, @nonus_european_sites );
+ $$page_content .= '</div>';
+
+ $$page_content .= '<p style="clear:both">'.sprintf( _g('If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.' ), 'http://www.debian.org/mirror/list-non-US' ).'</p>';
} elsif ($archive eq 'backports') {
$$page_content .= '<div class="cardleft">';
foreach( @$source_files ) {
my ($src_file_md5, $src_file_size, $src_file_name)
= split /\s+/, $_;
- my $src_url;
- for ("$suite/$archive") {
- /security/o && do {
- $src_url = $FTP_SITES{security}; last };
- /volatile/o && do {
- $src_url = $FTP_SITES{volatile}; last };
- /backports/o && do {
-
- $src_url = $FTP_SITES{backports}; last };
- /non-us/io && do {
- $src_url = $FTP_SITES{'non-US'}; last };
- $src_url = $FTP_SITES{us};
- }
+ (my $server = lc $archive) =~ s/-//go; # non-US hack
+ my $src_url = $FTP_SITES{$server}
+ || $FTP_SITES{us};
$src_url .= "/$source_dir/$src_file_name";
$package_page .= "<tr><td><a href=\"$src_url\">$src_file_name</a></td>\n"
} else {
foreach( @$files ) {
my ($src_file_md5, $src_file_size, $src_file_name) = split /\s/o, $_;
- for ("$suite/".$page->get_newest('archive')) {
- /security/o && do {
- $str .= "<a href=\"$env->{security}/$src_dir/$src_file_name\">["; last };
- /volatile/o && do {
- $str .= "<a href=\"$env->{volatile}/$src_dir/$src_file_name\">["; last };
- /backports/o && do {
- $str .= "<a href=\"$env->{backports}/$src_dir/$src_file_name\">["; last };
- /non-us/io && do {
- $str .= "<a href=\"$env->{'non-US'}/$src_dir/$src_file_name\">["; last };
- $str .= "<a href=\"$env->{us}/$src_dir/$src_file_name\">[";
- }
+ # non-US hack
+ (my $server = lc $page->get_newest('archive')) =~ s/-//go;
+ $str .= sprintf("<a href=\"%s/$src_dir/$src_file_name\">[",
+ $env->{$server}||$env->{us});
if ($src_file_name =~ /dsc$/) {
$str .= "dsc";
} else {