From 15990d3ecd1f7652d5d8e3ea58e11809e7db0cba Mon Sep 17 00:00:00 2001 From: timriker Date: Fri, 17 Dec 2004 16:18:36 +0000 Subject: [PATCH] system() == evil git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1103 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Modules/Debian.pl | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Modules/Debian.pl b/src/Modules/Debian.pl index 8f4d893..1da1c12 100644 --- a/src/Modules/Debian.pl +++ b/src/Modules/Debian.pl @@ -11,21 +11,21 @@ use strict; no strict 'refs'; # FIXME: dstats aborts if set my $announce = 0; -my $defaultdist = "sid"; +my $defaultdist = 'sid'; my $refresh = &::getChanConfDefault('debianRefreshInterval',7) * 60 * 60 * 24; my $debug = 0; -my $debian_dir = "$::bot_state_dir/debian"; -my $country = "us"; # well .config it yourself then. ;-) -my $protocol = "http"; +my $debian_dir = $::bot_state_dir . 'debian'; +my $country = 'us'; # well .config it yourself then. ;-) +my $protocol = 'http'; # format: "alias=real". my %dists = ( - "unstable" => "sid", - "testing" => "sarge", - "stable" => "woody", - "oldstable" => "potato", - "incoming" => "incoming", + 'unstable' => 'sid', + 'testing' => 'sarge', + 'stable' => 'woody', + 'oldstable' => 'potato', + 'incoming' => 'incoming', ); my %urlcontents = ( @@ -135,12 +135,12 @@ sub DebianDownload { next; } - my $exit = CORE::system("/bin/gzip -t $file >/dev/null 2>&1"); - if ($exit) { - &::WARN("deb: $file is corrupted :/"); - unlink $file; - next; - } +# my $exit = system("/bin/gzip -t $file"); +# if ($exit) { +# &::WARN("deb: $file is corrupted ($exit) :/"); +# unlink $file; +# next; +# } &::DEBUG("deb: download: good.") if ($debug); $good++; @@ -1112,12 +1112,12 @@ sub debianCheck { next unless ($file =~ /(gz|bz2)$/); # TODO: add bzip2 support (debian doesn't do .bz2 anyway) - my $exit = system("/bin/gzip -t '$debian_dir/$file'"); - next unless ($exit); + #my $exit = system("/bin/gzip -t '$debian_dir/$file'"); + #next unless ($exit); &::DEBUG("deb: hmr... => ".(time() - (stat($file))[8])."'."); next unless (time() - (stat($file))[8] > 3600); - &::DEBUG("deb: dC: exit => '$exit'."); + #&::DEBUG("deb: dC: exit => '$exit'."); &::WARN("dC: '$debian_dir/$file' corrupted? deleting!"); unlink $debian_dir."/".$file; $retval++; -- 2.39.2