]> git.deb.at Git - deb/packages.git/blobdiff - lib/Packages/DoDownload.pm
Don't let come virtual packages in our way
[deb/packages.git] / lib / Packages / DoDownload.pm
index ab3ab73197cd47ef4cc01f7223c94ec07d2b5c9a..60a50cb72464e6719ad885ee11fc358b6d7a2ad5 100644 (file)
@@ -232,6 +232,7 @@ sub do_download {
        
        read_entry( \%packages, $pkg, \@results, $opts );
 
+       @results = grep { $_->[7] ne 'v' } @results;
        unless (@results) {
            fatal_error( _g( "No such package." )."<br>".
                         sprintf( _g( '<a href="%s">Search for the package</a>' ), "$SEARCH_URL/$pkg" ) );
@@ -243,6 +244,7 @@ sub do_download {
                }
            }
            
+           debug( "final_result=@$final_result", 1 );
            $archive = $final_result->[1];
            my %data = split /\000/, $packages_all{"$pkg $arch $final_result->[7]"};
            $file = $data{filename};
@@ -269,6 +271,13 @@ sub do_download {
        } else {
            $$page_content .= "<p>".sprintf( _g( 'You can download the requested file from the <tt>%s</tt> subdirectory at:' ), $directory )."</p>\n";
        }
+
+       hint(sprintf(_g("If you are running Debian, it's strongly suggested to use a
+           package manager like <a href=\"%s\">aptitude</a> or <a
+           href=\"%s\">synaptic</a> to download and install
+           packages, instead of doing so manually via this website."),
+                    make_url('aptitude','',{arch=>undef}), 
+                    make_url('synaptic','',{arch=>undef}) ) );
        
        if ($archive eq 'security') {
            
@@ -278,20 +287,13 @@ sub do_download {
 
            $$page_content .= print_links( _g( "North America" ), $file, @amd64_north_american_sites );
            $$page_content .= print_links( _g( "Europe" ), $file, @amd64_european_sites );
-#    $$page_content .= print_links( "Australia and New Zealand", $file,
-#               @nonus_australian_sites );
            $$page_content .= print_links( _g( "Asia" ), $file, @amd64_asian_sites );
-#    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
 
            $$page_content .= '<p>'._g( 'Note that AMD64 is not officialy included in the Debian archive yet, but the AMD64 porter group keeps their archive in sync with the official archive as close as possible. See the <a href="http://www.debian.org/ports/amd64/">AMD64 ports page</a> for current information.' ).'</p>';
        } elsif ($arch eq 'kfreebsd-i386') {
 
            $$page_content .= print_links( _g( "North America" ), $file, @kfreebsd_north_american_sites );
            $$page_content .= print_links( _g( "Europe" ), $file, @kfreebsd_european_sites );
-#    $$page_content .= print_links( "Australia and New Zealand", $file,
-#               @nonus_australian_sites );
-#    $$page_content .= print_links( "Asia", $file, @amd64_asian_sites );
-#    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
        
            $$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') {
@@ -306,25 +308,18 @@ sub do_download {
            $$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>';
        } elsif ($archive eq 'backports') {
        
-#    $$page_content .= print_links( "North America", $file, @nonus_north_american_sites );
            $$page_content .= '<div class="cardleft">';
            $$page_content .= print_links( _g( "Europe" ), $file, @backports_european_sites );
            $$page_content .= '</div><div class="cardright">';
            $$page_content .= print_links( _g( "Australia and New Zealand" ), $file,
                                           @backports_australian_sites );
            $$page_content .= print_links( _g( "Asia" ), $file, @backports_asian_sites );
-#    $$page_content .= print_links( "South America", $file, @nonus_south_american_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.backports.org/debian/README.mirrors.html' ).'</p>';
        } elsif ($archive eq 'volatile') {
            
-#    $$page_content .= print_links( "North America", $file, @nonus_north_american_sites );
            $$page_content .= print_links( _g( "Europe" ), $file, @volatile_european_sites );
-#    $$page_content .= print_links( "Australia and New Zealand", $file,
-#               @nonus_australian_sites );
-#    $$page_content .= print_links( "Asia", $file, @nonus_asian_sites );
-#    $$page_content .= print_links( "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://volatile.debian.net/mirrors.html' ).'</p>';
        } elsif ($archive eq 'us') {