debugging BlameJason mailtrainer.crm
Thomas Spahni <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
Hi As reported before Ger H's release barfs in mailtrainer.crm and I'm trying to debug this. I am a complete novice in crm114 coding, so please bare with me if the following is complete nonsense. Lines 271/272 seem to be broken. ########################################################### # # set gooddir and spamdir to the directory parts of the spec # match [:good:] (:gooddir: :goodwildcard:) /^.*[\\\/]([^\\\/]*)/ match [:spam:] (:spamdir: :spamwildcard:) /^.*[\\\/]([^\\\/]*)/ Here :gooddir: will match the whole string of :good: but we want just the directory path. I fix this: ########################################################### # # set gooddir and spamdir to the directory parts of the spec # match [:good:] (:: :gooddir: :goodwildcard:) /^(.*[\\\/])([^\\\/]*)/ match [:spam:] (:: :spamdir: :spamwildcard:) /^(.*[\\\/])([^\\\/]*)/ Now it works as expected. But then I tried to run it from a small test script with BillY binary (BlameTheSegfault) and it barfs! /usr/bin/crm114-bill: *WARNING* This operand doesn't seem to end. Bug? --> I'll try to keep working. This happened at line 5 of file ./bugtest.crm The line was: --> match [:good:] ( :: :gooddir: :goodwildcard:) /^(.*[\\\/])([^\\\/]*)/ <-- /usr/bin/crm114-bill: *ERROR* Regular Expression Compilation Problem: Missing ']' Sorry, but this program is very sick and probably should be killed off. This happened at line 5 of file ./bugtest.crm The line was: --> match [:good:] ( :: :gooddir: :goodwildcard:) /^(.*[\\\/])([^\\\/]*)/ <-- Interesting enough it runs ok with both binaries when we change the order in the regex: ########################################################### # # set gooddir and spamdir to the directory parts of the spec # match [:good:] (:: :gooddir: :goodwildcard:) /^(.*[\/\\])([^\/\\]*)/ match [:spam:] (:: :spamdir: :spamwildcard:) /^(.*[\/\\])([^\/\\]*)/ so that's what I did. (Mumble: very odd, should work the other way round as well). We're not done yet. Syscalled 'find' still barfs, because lines 300/311 will append an '*' to overlapped :spamdir: or :gooddir: as well. Maybe that was introduced by my changes. Anyway, let's isolate them. It now reads: ########################################################### # # set gooddir and spamdir to the directory parts of the spec # match [:good:] (:: :gooddir: :goodwildcard:) /^(.*[\/\\])([^\/\\]*)/ match [:spam:] (:: :spamdir: :spamwildcard:) /^(.*[\/\\])([^\/\\]*)/ isolate (:gooddir:) /:*:gooddir:/ isolate (:spamdir:) /:*:spamdir:/ ...and lines 300 / 311 have been amended to: alter (:goodwildcard:) /'*'/ and alter (:spamwildcard:) /'*'/ to make find happy. No errors any more, but (sigh) it doesn't learn. Number of messages learnt count up (one by one) but 'Total buckets in use' remains zero and I don't see the familiar message 'LEARNED AND CACHED SPAM/GOOD' but instead: X-CRM114-Version: 20080502-BlameJason ( TRE 0.7.5 (LGPL) ) MR-A8493A25 X-CRM114-CacheID: sfid-20080818_125940_574421_8940C2CE Message-Id: (sfid-20080818_125940_574421_8940C2CE) X-CRM114-Status: UNSURE ( 0.00 ) X-CRM114-Notice: Please train this message. Giving up for now awaiting your comments Thomas Spahni ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/