]> git.donarmstrong.com Git - infobot.git/commitdiff
stop searching if found>100
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 18 Dec 2000 13:35:40 +0000 (13:35 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 18 Dec 2000 13:35:40 +0000 (13:35 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@208 c11ca15a-4712-0410-83d8-924469b57eb5

blootbot/src/Modules/Debian.pl

index 30ce90b9e8bc4054a04d35debd282f225f303333..89e249efb623cdcf808fa4bbcb1f939c1c92435d 100644 (file)
@@ -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 (<IN>) {
        if (/^\.?\/?(.*?)[\t\s]+(\S+)\n$/) {
@@ -243,6 +242,8 @@ sub searchContents {
            $contents{$package}{$file} = 1;
            $found++;
        }
+
+       last if ($found > 100);
     }
     close IN;