From: dms Date: Sun, 20 Aug 2000 13:58:26 +0000 (+0000) Subject: we don't stop if debianDownload fails unless none of the files exist locally X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=df62d24d063108a4c400476c9a6447efcda51b3b;p=infobot.git we don't stop if debianDownload fails unless none of the files exist locally git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@54 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Modules/Debian.pl b/blootbot/src/Modules/Debian.pl index f2e50f0..8eb2fe9 100644 --- a/blootbot/src/Modules/Debian.pl +++ b/blootbot/src/Modules/Debian.pl @@ -161,8 +161,7 @@ sub searchContents { # download contents file. &main::DEBUG("deb: download 1."); if (!&DebianDownload($dist, %urls)) { - &main::ERROR("Debian: could not download files."); - return; + &main::WARN("Debian: could not download files."); } } @@ -172,7 +171,18 @@ sub searchContents { my $found = 0; my %contents; my $search = "$query.*\[ \t]"; - my $files = join(' ', keys %urlcontents); + foreach (keys %urlcontents) { + next unless ( -f $_); + push(@files,$_); + } + + if (!scalar @files) { + &main::ERROR("sC: no files?"); + &main::msg($main::who, "failed."); + return; + } + + my $files = join(' ', @files); $files =~ s/##DIST/$dist/g; open(IN,"zegrep -h '$search' $files |");