]> git.deb.at Git - deb/packages.git/blobdiff - lib/Packages/DoShow.pm
Fix download locations for source packages
[deb/packages.git] / lib / Packages / DoShow.pm
index b5a12876b58cc3caba94dfcafab19d57d68755bc..076e11f7c3826a909ed459b412eb7a2e898c6b3f 100644 (file)
@@ -75,19 +75,13 @@ sub do_show {
            foreach (@results, @non_results) {
                my $a = $_->[1];
                my $s = $_->[2];
-               if ($a =~ /^(?:us|security|non-US)$/o) {
-                   $all_suites{$s}++;
-               } else {
-                   $all_suites{"$s/$a"}++;
-               }
+               $all_suites{$s}++;
            }
            foreach (suites_sort(keys %all_suites)) {
-               if (("$suite/$archive" eq $_)
-                   || (!$all_suites{"$suite/$archive"} && ($suite eq $_))) {
+               if ($suite eq $_) {
                    $$menu .= "[ <strong>$_</strong> ] ";
                } else {
-                   $$menu .=
-                       "[ <a href=\"$ROOT/$_/$encodedpkg\">$_</a> ] ";
+                   $$menu .= "[ <a href=\"$ROOT/$_/$encodedpkg\">$_</a> ] ";
                }
            }
            $$menu .= '<br>';
@@ -106,7 +100,8 @@ sub do_show {
                            $data{package} = $pkg;
                            $data{architecture} = $arch;
                            $data{version} = $version;
-                           $page->merge_package(\%data) or debug( "Merging $pkg $arch $version FAILED", 2 ) if DEBUG;
+                           $page->merge_package(\%data)
+                               or debug( "Merging $pkg $arch $version FAILED", 2 ) if DEBUG;
                        } else {
                            $page->add_provided_by([split /\s+/, $provided_by]);
                        }
@@ -150,16 +145,20 @@ sub do_show {
                        $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 ],
-                                              );
+                       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;
@@ -204,9 +203,6 @@ sub do_show {
                        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' ) ],
@@ -236,7 +232,7 @@ sub do_show {
                            $package_page .=  "\">$a</a></th>\n";
                            $package_page .= "<td>".$versions->{$a}."</td>"
                                if $multiple_versions;
-                           $package_page .= '</td><td class="size">';
+                           $package_page .= '<td class="size">';
                            $package_page .=  floor(($sizes_deb->{$a}/102.4)+0.5)/10 . "&nbsp;kB";
                            $package_page .= '</td><td class="size">';
                            $package_page .=  $sizes_inst->{$a} . "&nbsp;kB";
@@ -308,11 +304,11 @@ sub do_show {
 
                    $$menu .= simple_menu( [ _g( "Distribution:" ),
                                             _g( "Overview over this suite" ),
-                                            "/$suite/",
+                                            "$ROOT/$suite/",
                                             $suite ],
                                           [ _g( "Section:" ),
                                             _g( "All packages in this section" ),
-                                            "/$suite/$subsection/",
+                                            "$ROOT/$suite/$subsection/",
                                             $subsection ],
                                           );
                    
@@ -357,10 +353,6 @@ sub do_show {
                    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' ) ],
@@ -389,7 +381,7 @@ sub do_show {
                        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 {