$long_desc =~ s/(((\n|\A) [^\n]*)+)/\n<pre>$1\n<\/pre>/sgo;
# $long_desc = conv_desc( $lang, $long_desc );
# $short_desc = conv_desc( $lang, $short_desc );
-
- $$menu .= simple_menu( [ _g( "Distribution:" ),
- _g( "Overview over this suite" ),
- "$ROOT/$suite/",
- $suite ],
- [ _g( "Section:" ),
- _g( "All packages in this section" ),
- "$ROOT/$suite/$subsection/",
- $subsection ],
- [ _g( "Source:" ),
- _g( "Source package building this package" ),
- "$ROOT/$suite/source/".$page->get_src('package'),
- $page->get_src('package') ],
- );
+ my @menu = ( [ _g( "Distribution:" ),
+ _g( "Overview over this suite" ),
+ "$ROOT/$suite/",
+ $suite ],
+ [ _g( "Section:" ),
+ _g( "All packages in this section" ),
+ "$ROOT/$suite/$subsection/",
+ $subsection ], );
+ my $source = $page->get_src('package');
+ push @menu, [ _g( "Source:" ),
+ _g( "Source package building this package" ),
+ "$ROOT/$suite/source/$source",
+ $source ] if $source;
+ $$menu .= simple_menu( @menu );
my $v_str = $version;
my $multiple_versions = grep { $_ ne $version } values %$versions;
if ( $dep_list ) {
$package_page .= "<div id=\"pdeps\">\n";
$package_page .= sprintf( "<h2>"._g( "Other Packages Related to %s" )."</h2>\n", $pkg );
- if ($suite eq "experimental") {
- note( sprintf( _g( 'Note that the <strong>experimental</strong> distribution is not self-contained; missing dependencies are likely found in the <a href="%s">unstable</a> distribution.' ), "$ROOT/unstable/" ) );
- }
$package_page .= pdeplegend( [ 'dep', _g( 'depends' ) ],
[ 'rec', _g( 'recommends' ) ],
if ( $dep_list ) {
$package_page .= "<div id=\"pdeps\">\n";
$package_page .= sprintf( "<h2>"._g( "Other Packages Related to %s" )."</h2>\n", $pkg );
- if ($suite eq "experimental") {
- note( sprintf( _g( 'Note that the <strong>experimental</strong> distribution is not self-contained; missing dependencies are likely found in the <a href="%s">unstable</a> distribution.' ), "$ROOT/unstable/" ) );
-
- }
$package_page .= pdeplegend( [ 'adep', _g( 'build-depends' ) ],
[ 'idep', _g( 'build-depends-indep' ) ],
my ($src_file_md5, $src_file_size, $src_file_name)
= split /\s+/, $_;
my $src_url;
- for ($archive) {
+ for ("$suite/$archive") {
/security/o && do {
$src_url = $FTP_SITES{security}; last };
/volatile/o && do {
} else {
foreach( @$files ) {
my ($src_file_md5, $src_file_size, $src_file_name) = split /\s/o, $_;
- for ($page->get_newest('archive')) {
+ for ("$suite/".$page->get_newest('archive')) {
/security/o && do {
$str .= "<a href=\"$env->{security}/$src_dir/$src_file_name\">["; last };
/volatile/o && do {
/backports/o && do {
$str .= "<a href=\"$env->{backports}/$src_dir/$src_file_name\">["; last };
/non-us/io && do {
- $str .= "<a href=\"$env->{nonus_site}/$src_dir/$src_file_name\">["; last };
+ $str .= "<a href=\"$env->{'non-US'}/$src_dir/$src_file_name\">["; last };
$str .= "<a href=\"$env->{us}/$src_dir/$src_file_name\">[";
}
if ($src_file_name =~ /dsc$/) {
my $short_desc = $entry->[-1];
my $arch = $entry->[3];
my $archive = $entry->[1];
+ my $path = $entry->[2];
if ( $short_desc ) {
- my $path = $suite;
if ( $is_old_pkgs ) {
push @res_pkgs, dep_item( "$ROOT/$path/$p_name",
$p_name, "$pkg_version$arch_str" );
my @non_results;
read_entry_all( $hash, $key, $results, \@non_results, $opts );
}
+
+#FIXME: make configurable
+my %fallback_suites = (
+ 'stable-backports' => 'stable',
+ 'stable-volatile' => 'stable',
+ experimental => 'unstable' );
+
sub read_entry_simple {
my ($hash, $key, $archives, $suite) = @_;
# FIXME: drop $archives
debug( "use entry: @data", 2 ) if DEBUG && $data[1] eq $suite;
return [ $virt{$suite}, @data ] if $data[1] eq $suite;
}
+ if (my $fb_suite = $fallback_suites{$suite}) {
+ my $fb_result = read_entry_simple( $hash, $key, $archives, $fb_suite );
+ my $fb_virt = shift(@$fb_result);
+ $virt{$suite} .= $fb_virt if $fb_virt;
+ return [ $virt{$suite}, @$fb_result ] if @$fb_result;
+ }
return [ $virt{$suite} ];
}