]> git.donarmstrong.com Git - infobot.git/commitdiff
system() == evil
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 17 Dec 2004 16:18:36 +0000 (16:18 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 17 Dec 2004 16:18:36 +0000 (16:18 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1103 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/Debian.pl

index 8f4d89387d9784a0233904de99ccfa98a0ec5bf0..1da1c12bb641a81f379464886b1271afc60ab420 100644 (file)
@@ -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++;