From 471a241a0253bd442af48df0bd3d96c3753b8303 Mon Sep 17 00:00:00 2001 From: dms Date: Sun, 20 Aug 2000 13:58:26 +0000 Subject: [PATCH] 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/blootbot@54 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Modules/Debian.pl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Modules/Debian.pl b/src/Modules/Debian.pl index f2e50f0..8eb2fe9 100644 --- a/src/Modules/Debian.pl +++ b/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 |"); -- 2.39.2