From 4b7eb61d370a284dbfdf1de607c28b8c65a4bbde Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Thu, 2 Feb 2006 15:07:43 +0000 Subject: [PATCH] Print links to alternative suites, print raw data from _all db --- cgi-bin/show_package.pl | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) 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; -- 2.39.2