You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2005/08/05 02:54:32 UTC

svn commit: r230375 - /spamassassin/trunk/masses/rule-qa/corpus-hourly

Author: jm
Date: Thu Aug  4 17:54:31 2005
New Revision: 230375

URL: http://svn.apache.org/viewcvs?rev=230375&view=rev
Log:
better diagnostics from corpus-hourly

Modified:
    spamassassin/trunk/masses/rule-qa/corpus-hourly

Modified: spamassassin/trunk/masses/rule-qa/corpus-hourly
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/rule-qa/corpus-hourly?rev=230375&r1=230374&r2=230375&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/corpus-hourly (original)
+++ spamassassin/trunk/masses/rule-qa/corpus-hourly Thu Aug  4 17:54:31 2005
@@ -190,8 +190,8 @@
     if ($class eq "NET") {
         @ham = grep { /-net-/ } @ham;
         @spam = grep { /-net-/ } @spam;
-        print STDERR "ham: " . join(' ', @ham) . "\n";
-        print STDERR "spam: " . join(' ', @spam) . "\n";
+        print STDERR "ham (NET): " . join(' ', @ham) . "\n";
+        print STDERR "spam (NET): " . join(' ', @spam) . "\n";
     }
     else {
         # if both net and local exist, use newer
@@ -228,8 +228,8 @@
                 }
             }
         }
-        print STDERR "ham: " . join(' ', @ham) . "\n";
-        print STDERR "spam: " . join(' ', @spam) . "\n";
+        print STDERR "ham (non-NET): " . join(' ', @ham) . "\n";
+        print STDERR "spam (non-NET): " . join(' ', @spam) . "\n";
     }
     
     # age
@@ -243,8 +243,8 @@
         }
         @spam = grep { $revision{$_} eq $wanted } @spam;
         @ham = grep { $revision{$_} eq $wanted } @ham;
-        print STDERR "ham: " . join(' ', @ham) . "\n";
-        print STDERR "spam: " . join(' ', @spam) . "\n";
+        print STDERR "ham (NET $age): " . join(' ', @ham) . "\n";
+        print STDERR "spam (NET $age): " . join(' ', @spam) . "\n";
     }
     elsif ($age =~ /^(?:new|all|age)$/) {
         @ham = grep { -M "$_" < -M $opt{tagtime} } @ham;
@@ -253,15 +253,15 @@
             @ham = grep { $revision{$_} eq $revision } @ham;
             @spam = grep { $revision{$_} eq $revision } @spam;
         }
-        print STDERR "ham: " . join(' ', @ham) . "\n";
-        print STDERR "spam: " . join(' ', @spam) . "\n";
+        print STDERR "ham (non-NET $age): " . join(' ', @ham) . "\n";
+        print STDERR "spam (non-NET $age): " . join(' ', @spam) . "\n";
     }
     elsif ($age =~ /(\d+)day/) {
         my $mtime = $1;
         @ham = grep { -M "$_" < $mtime } @ham;
         @spam = grep { -M "$_" < $mtime } @spam;
-        print STDERR "ham: " . join(' ', @ham) . "\n";
-        print STDERR "spam: " . join(' ', @spam) . "\n";
+        print STDERR "ham (non-NET $age): " . join(' ', @ham) . "\n";
+        print STDERR "spam (non-NET $age): " . join(' ', @spam) . "\n";
     }
     
     open(OUT, "> $opt{html}/$class.$age");
@@ -292,7 +292,12 @@
         }
         unlink "$opt{tmp}/ham.log.$$";
         unlink "$opt{tmp}/spam.log.$$";
-        next unless (scalar keys %spam && scalar keys %ham);
+
+        if (!(scalar keys %spam && scalar keys %ham)) {
+            warn "no files found for $class.$age";
+            return;
+        }
+
         for my $user (sort keys %spam) {
             next unless defined $ham{$user};
             chdir "$opt{tree}/masses";