]> git.deb.at Git - deb/packages.git/blobdiff - lib/Packages/HTML.pm
Begin implementing virtual package support.
[deb/packages.git] / lib / Packages / HTML.pm
index a291a0028b6285d15e76880f35c9e1dfead4af1b..1663b8f71ef90a1c119a6ac5ddf4274c1875901e 100644 (file)
@@ -136,7 +136,7 @@ sub pmoreinfo {
            $str .= gettext( "Not found" );
        } else {
            foreach( @$files ) {
-               my ($src_file_md5, $src_file_size, $src_file_name) = @$_;
+               my ($src_file_md5, $src_file_size, $src_file_name) = split /\s/o, $_;
                for ($page->get_newest('archive')) {
                    /security/o && do {
                        $str .= "<a href=\"$env->{security}/$src_dir/$src_file_name\">["; last };
@@ -206,8 +206,9 @@ sub pmoreinfo {
 
     if ($info{search}) {
        my $encodedname = uri_escape( $name );
-       my $search_url = $is_source ? $SRC_SEARCH_URL : $SEARCH_URL;
-       $str .= "<p>".sprintf( gettext( "Search for <a href=\"%s\">other versions of %s</a>" ), $search_url.$encodedname, $name )."</p>\n";
+       my $search_url = $is_source ? "$ROOT/source" : $ROOT;
+       $str .= "<p>".sprintf( gettext( "Search for <a href=\"%s\">other versions of %s</a>" ),
+           "$search_url/$encodedname", $name )."</p>\n";
     }
 
     $str .= "</div> <!-- end pmoreinfo -->\n";
@@ -283,12 +284,12 @@ sub print_deps {
                (read_entry_simple( $packages, $p_name, $opts->{h_archives}, $opts->{suite}))->[-1];
            if ( $short_desc ) {
                if ( $is_old_pkgs ) {
-                   push @res_pkgs, dep_item( "/$opts->{suite}/$p_name",
+                   push @res_pkgs, dep_item( "$ROOT/$opts->{suite}/$p_name",
                                              $p_name, "$pkg_version$arch_str" );
                } else {
                    $short_descs{$p_name} ||= $short_desc;
                    $short_desc = encode_entities( $short_desc, "<>&\"" );
-                   push @res_pkgs, dep_item( "/$opts->{suite}/$p_name",
+                   push @res_pkgs, dep_item( "$ROOT/$opts->{suite}/$p_name",
                                              $p_name, "$pkg_version$arch_str", $short_desc );
                }
            } elsif ( $is_old_pkgs ) {