From 2c68295edf18a88ff0e5437c6f7f9a67438fd65a Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Tue, 7 Feb 2006 15:20:54 +0000 Subject: [PATCH] - Add $ROOT at appropriate places - Move display of 'kB' to the column itself, and right align it --- cgi-bin/show_package.pl | 33 ++++++++++----------------------- config.sh | 6 +++--- lib/Packages/HTML.pm | 9 +++++---- 3 files changed, 18 insertions(+), 30 deletions(-) diff --git a/cgi-bin/show_package.pl b/cgi-bin/show_package.pl index 445195d..747db62 100755 --- a/cgi-bin/show_package.pl +++ b/cgi-bin/show_package.pl @@ -225,11 +225,11 @@ unless (@Packages::CGI::fatal_errors) { $package_page .= simple_menu( [ gettext( "Distribution:" ), gettext( "Overview over this suite" ), - "/$suite/", + "$ROOT/$suite/", $suite ], [ gettext( "Section:" ), gettext( "All packages in this section" ), - "/$suite/$subsection/", + "$ROOT/$suite/$subsection/", $subsection ], ); @@ -298,35 +298,22 @@ unless (@Packages::CGI::fatal_errors) { $package_page .= "".gettext("Architecture")."".gettext("Files")."".gettext( "Package Size")."".gettext("Installed Size")."\n"; foreach my $a ( @archs ) { $package_page .= "\n"; - $package_page .= "{$a}); - $package_page .= "&md5sum=$file_md5sums->{$a}"; - $package_page .= "&arch=$a"; - for ($archives->{$a}) { - /security/o && do { - $package_page .= "&type=security"; last }; - /volatile/o && do { - $package_page .= "&type=volatile"; last }; - /backports/o && do { - $package_page .= "&type=backports"; last }; - /non-us/io && do { - $package_page .= "&type=nonus"; last }; - $package_page .= "&type=main"; - } + $package_page .= "$a\n"; $package_page .= ""; if ( $suite ne "experimental" ) { - $package_page .= sprintf( "[".gettext( "list of files" )."]\n", "$FILELIST_URL$encodedpkg&version=$suite&arch=$a", $pkg ); + $package_page .= sprintf( "[".gettext( "list of files" )."]\n", + "$ROOT/$suite/$encodedpkg/$a/filelist", $pkg ); } else { $package_page .= gettext( "no current information" ); } - $package_page .= "\n"; - $package_page .= floor(($sizes_deb->{$a}/102.4)+0.5)/10; - $package_page .= "\n"; - $package_page .= $sizes_inst->{$a}; + $package_page .= "\n"; #FIXME: css + $package_page .= floor(($sizes_deb->{$a}/102.4)+0.5)/10 . " kB"; + $package_page .= "\n"; #FIXME: css + $package_page .= $sizes_inst->{$a} . " kB"; $package_page .= "\n"; } - $package_page .= "

".gettext ( "Size is measured in kBytes." )."

\n"; + $package_page .= "\n"; $package_page .= " \n"; # diff --git a/config.sh b/config.sh index 8867ddb..7503265 100644 --- a/config.sh +++ b/config.sh @@ -33,9 +33,9 @@ kfreebsd_ftpsite=http://kfreebsd-gnu.debian.net/debian root="" search_page="http://packages.debian.net/" -search_cgi="/cgi-bin/search_packages.pl" -search_url="/search/" -search_src_url="/search/source/" +# FIXME: remove dupe +search_cgi="/search" +search_url="/search" webmaster=webmaster@debian.org contact=debian-www@lists.debian.org home="http://www.debian.org" diff --git a/lib/Packages/HTML.pm b/lib/Packages/HTML.pm index 8d43b3b..1663b8f 100644 --- a/lib/Packages/HTML.pm +++ b/lib/Packages/HTML.pm @@ -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 .= "

".sprintf( gettext( "Search for other versions of %s" ), $search_url.$encodedname, $name )."

\n"; + my $search_url = $is_source ? "$ROOT/source" : $ROOT; + $str .= "

".sprintf( gettext( "Search for other versions of %s" ), + "$search_url/$encodedname", $name )."

\n"; } $str .= " \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 ) { -- 2.39.2