SA Bugzilla – Bug 5781
sandbox eval rules cause error message during make
Last modified: 2008-01-14 12:33:40 UTC
I created an eval rule in my sandbox. If I commit it and svn update, or if I manually edit my sandbox file in rulesrc, then do a make clean ; make, I see an error message in the make test output that looks like this: rules: failed to run T_SIDNEY_TEST__UNUSABLE_MSGID test, skipping: (Can't locate object method "check_messageid_not_usable" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 228) line 38. ) In this example the rule I used was a copy of __UNUSABLE_MSGID, so it s not a matter of something wrong with the rule itself header T_SIDNEY_TEST__UNUSABLE_MSGID eval:check_messageid_not_usable() The rule itself appears to work once the make is done. make test runs fine. Running make again without a make clean does not generate the error.
can you attach a patch that demos this? there isn't really enough info there to figure it out.
(reply to comment #1) It isn't really a matter of a patch. I thought that having an eval rule in my sandbox was enough to trigger this bug, but I see that there are plenty of eval rules in other people's sandboxes, yet I only see the problem with rules I put in mine. I'm going to have to track this down more specifically.
I have a rule that is triggering this checkd in to my sandbox, so unless this is caused by something special in my environent, here's all you have to do to reproduce it. In trunk, if I svn update make clean perl Makfile.PL make than when make gets to buld/mkrules and processes my sandbox file in rulesrc I see rulesrc/sandbox/sidney/70_other.cf: 0 active rules, 20 other rules: failed to run T_SIDNEY__GATED_THROUGH_RCVD_REMOVER test, skipping: (Can't locate object method "gated_through_received_hdr_remover" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 227) line 19. ) Do you not get the error?
yeah, I get it now ;) This seems to fix it: Index: rulesrc/sandbox/sidney/70_other.cf =================================================================== --- rulesrc/sandbox/sidney/70_other.cf (revision 611821) +++ rulesrc/sandbox/sidney/70_other.cf (working copy) @@ -14,7 +14,9 @@ header T_SIDNEY__LYRIS_EZLM_REMAILER List-Unsubscribe =~ /<mailto:(?:leave-\S+|\S+-unsubscribe)\@\S+>$/ # ezmlm again +ifplugin Mail::SpamAssassin::Plugin::HeaderEval header T_SIDNEY__GATED_THROUGH_RCVD_REMOVER eval:gated_through_received_hdr_remover() +endif # Allen notes this as 'Wacky sendmail version?' header T_SIDNEY__WACKY_SENDMAIL_VERSION Received =~ /\/CWT\/DCE\)/ basically, the build/mkrules linting code doesn't load any .pre files from the files in rules/*.pre, so it hasn't loaded the HeaderEval plugin, hence the warning.
Thanks.