X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=lib%2FPackages%2FDoSearchContents.pm;h=1be7d441cc90e25c6da65a0b855a2916d809e8ff;hb=2cd81017ac27717adcda738074294c4f5cd9e4cd;hp=101c10cc975e90f8b93f3790d811c08119e53013;hpb=f713acc32b708beb2756e49385259be7b8341c6b;p=deb%2Fpackages.git diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index 101c10c..1be7d44 100644 --- a/lib/Packages/DoSearchContents.pm +++ b/lib/Packages/DoSearchContents.pm @@ -14,12 +14,12 @@ our @EXPORT = qw( do_search_contents ); use Deb::Versions; use Packages::I18N::Locale; use Packages::Search qw( :all ); -use Packages::CGI; +use Packages::CGI qw( :DEFAULT error ); use Packages::DB; use Packages::Config qw( $DBDIR @SUITES @ARCHIVES @ARCHITECTURES $ROOT ); sub do_search_contents { - my ($params, $opts, $html_header, $page_content) = @_; + my ($params, $opts, $page_content) = @_; if ($params->{errors}{keywords}) { fatal_error( _g( "keyword not valid or missing" ) ); @@ -34,7 +34,7 @@ sub do_search_contents { #FIXME: that's extremely hacky atm if ($params->{values}{suite}{no_replace}[0] eq 'default') { $params->{values}{suite}{no_replace} = - $params->{values}{suite}{final} = $opts->{suite} = [ 'stable' ]; + $params->{values}{suite}{final} = $opts->{suite} = [ 'etch' ]; } if (@{$opts->{suite}} > 1) { @@ -75,6 +75,7 @@ sub do_search_contents { &searchfile(\@results, reverse($_)."/", \$nres, $reverses); last if $Packages::Search::too_many_hits; } + while () {}; close FILENAMES or warn "fgrep error: $!\n"; } else { @@ -82,6 +83,7 @@ sub do_search_contents { if @keywords; my $kw = reverse $first_kw; + $kw =~ s{/+$}{}; # exact filename searching follows trivially: $kw = "$kw/" if $mode eq 'exactfilename';