#!/usr/local/bin/perl
# edit_pack.cgi
# Displays the details of an existing package, with links to uninstall and
# other options
require './software-lib.pl';
&ReadParse();
@pinfo = &package_info($in{'package'}, $in{'version'});
$pinfo[0] || &error($text{'edit_egone'});
&ui_print_header(undef, $text{'edit_title'}, "", "edit_pack");
print "
\n";
print " | $text{'edit_details'} |
\n";
print " \n";
if ($pinfo[2]) {
print " | $text{'edit_desc'} | \n";
print "",
&html_escape(&entities_to_ascii($pinfo[2])),
" | \n";
}
print " | $text{'edit_pack'} | ",
&html_escape($pinfo[0])," | \n";
print "$text{'edit_class'} | ",
$pinfo[1] ? &html_escape($pinfo[1]) : $text{'edit_none'}," | \n";
print " | $text{'edit_ver'} | ",
&html_escape($pinfo[4])," | \n";
print "$text{'edit_vend'} | ",
&html_escape($pinfo[5])," | \n";
print " | $text{'edit_arch'} | ",
&html_escape($pinfo[3])," | \n";
print "$text{'edit_inst'} | ",
&html_escape($pinfo[6])," | \n";
print " |
\n";
print "
\n";
# Show button to list files, if supported
if (!$pinfo[8]) {
print "\n";
}
# Show button to un-install (if possible)
if (!$pinfo[7]) {
print "\n";
}
print "
\n";
if ($in{'search'}) {
&ui_print_footer("search.cgi?search=$in{'search'}", $text{'search_return'});
}
else {
&ui_print_footer("tree.cgi#$pinfo[1]", $text{'index_treturn'});
}