From: Jeroen van Wolffelaar Date: Thu, 2 Feb 2006 15:07:43 +0000 (+0000) Subject: Print links to alternative suites, print raw data from _all db X-Git-Tag: switch-to-templates~185 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=4b7eb61d370a284dbfdf1de607c28b8c65a4bbde;p=deb%2Fpackages.git Print links to alternative suites, print raw data from _all db --- diff --git a/cgi-bin/show_package.pl b/cgi-bin/show_package.pl index eba1b58..bf84db0 100755 --- a/cgi-bin/show_package.pl +++ b/cgi-bin/show_package.pl @@ -121,13 +121,37 @@ my $obj2 = tie my %packages_all, 'DB_File', "$DBDIR/packages_all_$suite.db", O_R my %allsuites = (); my @results = (); + &read_entry( $package, \@results, \%allsuites ); + +if (keys %allsuites == 0) { + print "No such package"; + print "{insert link to search page with substring search}"; + exit; +} + +# sort is gross -- only fails for experimental though +for (sort keys %allsuites) { + if ($suite eq $_) { + print "$_ | "; + } else { + print "$_ | "; + } +} +print "
"; +if (not exists $allsuites{$suite}) { + print "Package not available in this suite"; + exit; +} + for my $entry (@results) { print join ":", @$entry; print "
\n"; + my ($foo, $arch, $section, $subsection, + $priority, $version) = @$entry; + print "
".$packages_all{"$package $arch $version"}."
"; } -print "Available in ".(join ', ', keys %allsuites)."\n"; &printfooter;