- if ($Packages::Search::too_many_hits) {
- error( _g( "Your search was too wide so we will only display only the first about 100 matches. Please consider using a longer keyword or more keywords." ) );
- }
-
- if (!@Packages::CGI::fatal_errors && !@results) {
- error( _g( "Nothing found" ) );
- }
-
- %$html_header = ( title => _g( 'Package Contents Search Results' ),
- lang => $opts->{lang},
- title_tag => _g( 'Debian Package Contents Search Results' ),
- print_title => 1,
- print_search_field => 'packages',
- search_field_values => {
- keywords => $keyword_enc,
- searchon => 'contents',
- arch => $archs_enc,
- suite => $suites_enc,
- section => $sections_enc,
- exact => $opts->{exact},
- debug => $opts->{debug},
- },
- );
-
- $$page_content = '';
- if (@results) {
- my (%results,%archs);
- foreach my $result (sort { $a->[0] cmp $b->[0] } @results) {
- my $file = shift @$result;
- my %pkgs;
- foreach (@$result) {
- my ($pkg, $arch) = split /:/, $_;
- next unless $opts->{h_archs}{$arch};
- $pkgs{$pkg}{$arch}++;
- $archs{$arch}++ unless $arch eq 'all';
- }
- next unless keys %pkgs;
- $results{$file} = \%pkgs;
+ my (%results,%archs);
+ foreach my $result (sort { $a->[0] cmp $b->[0] } @results) {
+ my $file = shift @$result;
+ my %pkgs;
+ foreach (@$result) {
+ my ($pkg, $arch) = split /:/, $_;
+ next unless $opts->{h_archs}{$arch};
+ $pkgs{$pkg}{$arch}++;
+ $archs{$arch}++ unless $arch eq 'all';