You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2010/02/24 04:53:25 UTC

svn commit: r915656 - /spamassassin/trunk/build/mkrules

Author: dos
Date: Wed Feb 24 03:53:24 2010
New Revision: 915656

URL: http://svn.apache.org/viewvc?rev=915656&view=rev
Log:
bug 6297: HACK? prevent rules with "tflags nopublish" from appearing in 72_active.cf; note that this needs testing to see what happens if a meta rule does something like "&& !$rule", where $rule has tflags no publish

Modified:
    spamassassin/trunk/build/mkrules

Modified: spamassassin/trunk/build/mkrules
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/mkrules?rev=915656&r1=915655&r2=915656&view=diff
==============================================================================
--- spamassassin/trunk/build/mkrules (original)
+++ spamassassin/trunk/build/mkrules Wed Feb 24 03:53:24 2010
@@ -936,6 +936,19 @@
     my $text    = $rules->{$rule}->{output_text};
     next unless defined ($text);
 
+# DOS - bug 6297 - HACK HACK HACK HACK
+# this will probably screw up meta rules that do something like '&& !$rule'
+
+    # avoid publishing 'tflags nopublish' rules
+    if (pubfile_is_activeout($pubfile) && exists $rules->{$rule}->{tflags} &&
+        $rules->{$rule}->{tflags} =~ /\bnopublish\b/)
+    {
+      print "omitting rule $rule due to tflags nopublish (tflags $rules->{$rule}->{tflags})\n";
+      next;
+    }
+
+# DOS - END HACK
+
     $output_file_text->{$pubfile} .= "##{ $rule\n".
                             $text.
                             "##} ".$rule."\n\n";
@@ -947,6 +960,20 @@
     my $pubfile = $rules->{$rule}->{output_file};
     my $text    = $rules->{$rule}->{output_text};
     next unless defined ($text);
+
+# DOS - bug 6297 - HACK HACK HACK HACK
+# this will probably screw up meta rules that do something like '&& !$rule'
+
+    # avoid publishing 'tflags nopublish' rules
+    if (pubfile_is_activeout($pubfile) && exists $rules->{$rule}->{tflags} &&
+        $rules->{$rule}->{tflags} =~ /\bnopublish\b/)
+    {
+      print "omitting rule $rule due to tflags nopublish (tflags $rules->{$rule}->{tflags})\n";
+      next;
+    }
+
+# DOS - END HACK
+
     $output_file_text->{$pubfile} .= $text;
   }