From 1a910dd8949a5a4ce3c93fa581a1f70fe5675997 Mon Sep 17 00:00:00 2001
From: Jeroen van Wolffelaar \n/go;
+ $long_desc =~ s/(((\n|\A) [^\n]*)+)/\n".$packages_all{"$package $arch $version"}."
";
}
+&showpackage($package);
+
+sub showpackage {
+ my ( $pkg ) = @_;
+
+ my $name = $pkg->get_name;
+
+ if ( $pkg->is_virtual ) {
+ print_virt_pack( @_ );
+ return;
+ }
+
+ my @all_archs = ( @{$env->{archs}}, 'all' );
+
+ my $page = new Packages::Page( $name,
+ { architectures => $env->{archs} } );
+ my $d = $page->set_data( $env->{db}, $pkg );
+
+ my %versions = $pkg->get_arch_versions( $env->{archs} );
+ my %subsuites = $pkg->get_arch_fields( 'subdistribution',
+ $env->{archs} );
+ my %filenames = $pkg->get_arch_fields( 'filename',
+ $env->{archs} );
+ my %file_md5s = $pkg->get_arch_fields( 'md5sum',
+ $env->{archs} );
+
+ my $subsuite_kw = $d->{subsuite} || $env->{distribution};
+ my $size_kw = exists $d->{sizes_deb}{i386} ? $d->{sizes_deb}{i386} : first_val($d->{sizes_deb});
+
+
+ foreach my $lang (@{$env->{langs}}) {
+ &Generated::Strings::string_lang($lang);
+
+ my $dirname = "$env->{dest_dir}/$d->{subsection}";
+ my $filename = "$dirname/$name.$lang.html";
+
+ unless (( $lang eq 'en' )
+ || $env->{db}->is_translated( $name, $d->{version},
+ ${$versions{v2a}{$d->{version}}}[0],
+ $lang )) {
+ $files->delete_file( $filename )
+ if $files->file_exists( $filename );
+ next;
+ }
+ progress() if $env->{opts}{progress};
+
+ #
+ # process description
+ #
+ my $short_desc = encode_entities( $env->{db}->get_short_desc( $d->{desc_md5},
+ $lang ), "<>&\"" );
+ my $long_desc = encode_entities( $env->{db}->get_long_desc( $d->{desc_md5},
+ $lang ), "<>&\"" );
+
+ $long_desc =~ s,((ftp|http|https)://[\S~-]+?/?)((\>\;)?[)]?[']?[:.\,]?(\s|$)),$1$3,go; # syntax highlighting -> '];
+ $long_desc =~ s/\A //o;
+ $long_desc =~ s/\n /\n/sgo;
+ $long_desc =~ s/\n.\n/\n$1\n<\/pre>/sgo;
+
+ $long_desc = conv_desc( $lang, $long_desc );
+ $short_desc = conv_desc( $lang, $short_desc );
+
+ #
+ # begin output
+ #
+ my $package_page = header( title => $name, lang => $lang,
+ desc => $short_desc,
+ keywords => "$env->{distribution}, $subsuite_kw, $d->{section}, $d->{subsection}, size:$size_kw $d->{version}" );
+ $package_page .= simple_menu( [ gettext( "Distribution:" ),
+ gettext( "Overview over this distribution" ),
+ "../",
+ $env->{distribution} ],
+ [ gettext( "Section:" ),
+ gettext( "All packages in this section" ),
+ "../$d->{subsection}/",
+ $d->{subsection} ],
+ );
+
+ my $title .= sprintf( gettext( "Package: %s (%s)" ), $name, $d->{v_str_simple} );
+ $title .= " ".marker( $d->{subsuite} ) if $d->{subsuite};
+ $title .= " ".marker( $d->{section} ) if $d->{section} ne 'main';
+ $package_page .= title( $title );
+
+ $package_page .= "
".gettext( "Versions:" )." $d->{v_str_arch}
\n"
+ unless $d->{version} eq $d->{v_str_simple};
+
+ if ($env->{distribution} eq "experimental") {
+ $package_page .= note( gettext( "Experimental package"),
+ gettext( "Warning: This package is from the experimental distribution. That means it is likely unstable or buggy, and it may even cause data loss. If you ignore this warning and install it nevertheless, you do it on your own risk.")."
". + gettext( "Users of experimental packages are encouraged to contact the package maintainers directly in case of problems." ) + ); + } + if ($d->{section} eq "debian-installer") { + $package_page .= note( gettext( "debian-installer udeb package"), + gettext( "Warning: This package is intended for the use in building debian-installer images only. Do not install it on a normal Debian system." ) + ); + } + $package_page .= pdesc( $short_desc, $long_desc ); + + # + # display dependencies + # + my $dep_list = print_deps( $env, $lang, $pkg, $d->{depends}, 'depends' ); + $dep_list .= print_deps( $env, $lang, $pkg, $d->{recommends}, 'recommends' ); + $dep_list .= print_deps( $env, $lang, $pkg, $d->{suggests}, 'suggests' ); + + if ( $dep_list ) { + $package_page .= "
".gettext("Architecture")." | ".gettext("Files")." | ".gettext( "Package Size")." | ".gettext("Installed Size")." |
---|---|---|---|
\n "; + $package_page .= "&file=".uri_escape($filenames{a2f}->{$a}); + $package_page .= "&md5sum=$file_md5s{a2f}->{$a}"; + $package_page .= "&arch=$a"; + # there was at least one package with two + # different source packages on different + # archs where one had a security update + # and the other one not + if ($subsuites{a2f}{$a} + && ($subsuites{a2f}{$a} =~ /security/o) ) { + $package_page .= "&type=security"; + } elsif ($subsuites{a2f}{$a} + && ($subsuites{a2f}{$a} =~ /volatile/o) ) { + $package_page .= "&type=volatile"; + } elsif ($d->{is_nonus}) { + $package_page .= "&type=nonus"; + } else { + $package_page .= "&type=main"; + } + $package_page .= "\">$a | \n";
+ $package_page .= ""; + if ( $env->{distribution} ne "experimental" ) { + $package_page .= sprintf( "[".gettext( "list of files" )."]\n", "$FILELIST_URL$encodedpack&version=$env->{distribution}&arch=$a", $name ); + } else { + $package_page .= "no files"; + } + $package_page .= " | \n"; + my $size = $d->{sizes_deb}{$a}; + $package_page .= "$size"; + $package_page .= " | \n"; + my $inst_size = $d->{sizes_inst}{$a}; + $package_page .= "$inst_size"; + $package_page .= " | \n
".gettext ( "Size is measured in kBytes." )."
\n"; + $package_page .= "