X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoSearchContents.pm;h=e86fc789783ef06dcecd7e9442535db7530f4c78;hb=f27f1fcc5bffc0696f694e962eb40dbb0c554855;hp=a11c11b84f16421aaf34d06d8718462c713615c5;hpb=a4e6ac9c039c1af7b853b8b3a616035b83f1bfd9;p=deb%2Fpackages.git diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index a11c11b..e86fc78 100644 --- a/lib/Packages/DoSearchContents.pm +++ b/lib/Packages/DoSearchContents.pm @@ -99,7 +99,7 @@ sub do_search_contents { my $st1 = new Benchmark; my $std = timediff($st1, $st0); - debug( "Search took ".timestr($std) ); + debug( "Search took ".timestr($std) ) if DEBUG; } my $suite_wording = $suites_enc eq "all" ? "all suites" @@ -145,7 +145,7 @@ sub do_search_contents { .''; foreach my $result (sort { $a->[0] cmp $b->[0] } @results) { my $file = shift @$result; - $$page_content .= "$file"; + $$page_content .= "/$file"; my %pkgs; foreach (@$result) { my ($pkg, $arch) = split /:/, $_; @@ -164,7 +164,7 @@ sub searchfile my ($results, $kw, $nres, $reverses) = @_; my ($key, $value) = ($kw, ""); - debug( "searchfile: kw=$kw", 1 ); + debug( "searchfile: kw=$kw", 1 ) if DEBUG; for (my $status = $reverses->seq($key, $value, R_CURSOR); $status == 0; $status = $reverses->seq( $key, $value, R_NEXT)) { @@ -172,7 +172,7 @@ sub searchfile # FIXME: what's the most efficient "is prefix of" thingy? We only want to know # whether $kw is or is not a prefix of $key last unless index($key, $kw) == 0; - debug( "found $key", 2 ); + debug( "found $key", 2 ) if DEBUG; my @hits = split /\0/o, $value; push @$results, [ scalar reverse($key), @hits ];