From fbedb0a5f2807a1c905181eeaf779f6efa4db73a Mon Sep 17 00:00:00 2001 From: dms Date: Mon, 18 Dec 2000 13:35:40 +0000 Subject: [PATCH] stop searching if found>100 git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@208 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Modules/Debian.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/blootbot/src/Modules/Debian.pl b/blootbot/src/Modules/Debian.pl index 30ce90b..89e249e 100644 --- a/blootbot/src/Modules/Debian.pl +++ b/blootbot/src/Modules/Debian.pl @@ -117,7 +117,7 @@ sub DebianDownload { } if (!&main::ftpGet($host,$path,$thisfile,$file)) { - &main::DEBUG("deb: down: ftpGet($host,$path,$thisfile,$file) == BAD."); + &main::WARN("deb: down: $file == BAD."); $bad++; next; } @@ -204,11 +204,11 @@ sub searchContents { $front = 1; $grepRE = $query; } else { - $grepRE = "$query.*\[ \t]"; + $grepRE = "$query*\[ \t]"; } ### fix up grepRE for "*". - $grepRE =~ s/\*/\.\*/g; + $grepRE =~ s/\*/.*/g; my @files; foreach (keys %urlcontents) { @@ -226,7 +226,6 @@ sub searchContents { my $files = join(' ', @files); - &main::status("search regex => '$grepRE'."); open(IN,"zegrep -h '$grepRE' $files |"); while () { if (/^\.?\/?(.*?)[\t\s]+(\S+)\n$/) { @@ -243,6 +242,8 @@ sub searchContents { $contents{$package}{$file} = 1; $found++; } + + last if ($found > 100); } close IN; -- 2.39.2