[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#235459: www.debian.org: "Search the contents of packages" fails for whole filename



tags 235459 patch
severity 235459 important
retitle 235459 packages.debian.org: search_contents doesn't do what it should
thanks

On Sun, Feb 29, 2004 at 04:16:59PM +0100, Mathijs Romans wrote:
> When I search for the file 'fancyheadings.sty', which is in tex/tetex-extra, in the "Search the contents of packages" section on the webpage, no files are 
> found. Curiously, if I search for 'fancyheadings.st', it does give the right package.

You're right, the code is broken. But since it is older than the CVS
repository, I don't know who to blame for that ;) Below is a patch that
should solve the issue. Can someone think of a cause why this wasn't
detected in the at least two years this code exists?

Index: cgi-bin/search_contents.pl
===================================================================
RCS file:
/var/cvs/debian.de/packages.debian.org/cgi-bin/search_contents.pl,v
retrieving revision 1.14
diff -u -r1.14 search_contents.pl
--- cgi-bin/search_contents.pl  11 Jan 2004 15:41:24 -0000      1.14
+++ cgi-bin/search_contents.pl  29 Feb 2004 16:26:24 -0000
@@ -150,9 +150,9 @@
 }
 $grep .= "$searchkeyword";
 if ($searchmode eq "searchfiles") {
-  $grep .= '"[^/ ]"';
+  $grep .= '" "';
 } elsif ($searchmode eq "searchfilesanddirs") {
-  $grep .= '"[^ ]"';
+  $grep .= '"[/ ]"';
 } elsif ($searchmode eq "filelist") {
   $searchkeyword = lc $searchkeyword; # just in case
   $searchkeyword =~ s/\+/\\\\+/g;

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/



Reply to: