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

Bug#72996: www.debian.org: Unsuccessful package keyword search yields all packages



* Karl A. Krueger <kkrueger@llama.whoi.edu> [20001002 11:16]:
> An unsuccessful keyword search at http://www.debian.org/distrib/packages
> will sometimes yield a list of all the packages in Debian at the moment.
> This appears to be because a keyword that never appears is ignored

I think the patch below fixes this problem.  I tried it on master in
offline mode and it seems to work.  However, more testing is needed!
I can't test it thoroughly because I cannot install cgi-bins on master.


--- /org/cgi.debian.org/cgi-bin/search_packages.pl	Wed Oct 25 18:16:27 2000
+++ search_packages.pl	Fri Oct 27 08:53:17 2000
@@ -106,6 +106,19 @@
 		last;
 	}
 }
+
+foreach(@results) {
+	if ( /^# ignored: (.+)$/ ) {
+		$ignored = $1;
+		last;
+	}
+}
+
+if ($ignored eq $keywordsearch) {  # all keywords have been ignored
+	$count = 0;
+	undef(@results);
+}
+
 if ($count) {
 print "<TR><TH>Release&nbsp; <TH>Quality <TH>Package (size)</TR>";
 }
@@ -119,10 +132,6 @@
 #}
 
 foreach( @results ) {
-	if ( /^# ignored: (.+)$/ ) {
-		$ignored = $1;
-		next;
-	}
 	##
 	# Future releases of SWISH++ may emit other comments: ignore ones we
 	# don't know about.

-- 
Martin Michlmayr
tbm@cyrius.com



Reply to: