Bug 1681 - sa-learn AnyDBM_File doesn't define an EXISTS method in BayesStore.pm line 658
Summary: sa-learn AnyDBM_File doesn't define an EXISTS method in BayesStore.pm line 658
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 2.51
Hardware: Sun Solaris
: P5 major
Target Milestone: 2.60
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
: 1709 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-24 15:34 UTC by David Meleedy
Modified: 2003-03-31 09:13 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
change back to using defined(). I could not observe any speed hit from this change, so it seems safe patch None Justin Mason [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description David Meleedy 2003-03-24 15:34:00 UTC
I recently installed spamassassin 2.51 and as soon as we tried to do sa-learn
we got the following problem:

$ sa-learn --nonspam --dir ~/Mail/inbox
AnyDBM_File doesn't define an EXISTS method at
/cpd/gnu/modules/perl5.6.1/lib/site_perl/5.6.1/Mail/SpamAssassin/BayesStore.pm
line 658

This is the first global installation we've used.  According to my user's,
this did not happen with versino 2.50 when installed in their home directories.

Let me know if you need any further information.
Comment 1 David Meleedy 2003-03-24 16:11:21 UTC
Ok, I had a local perl hacker look at this, and we found out what is going on.

the interface from perl to ndbm (NDBM_File) does not support the EXISTS method
to check whether a key exists in the database.

In the file BayesStore.pm, if you change the line:

BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File SDBM_File); }

to

BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File SDBM_File); }

this fixes the problem.

Probably other people (like the SpamAssassin developers) aren't having
this problem because they are running on machines that have either
Berkeley DB ("DB_File") or gdbm installed.  I think gdbm is standard on
linux.

By removing NDBM_File from the list the SDBM database library that comes
with perl is used instead.
Comment 2 Antony Mawer 2003-03-24 16:22:51 UTC
Subject: Re: [SAdev]  sa-learn AnyDBM_File doesn't define an EXISTS method in BayesStore.pm line 658 


> By removing NDBM_File from the list the SDBM database library that comes
> with perl is used instead.

BTW, I strongly recommend installing DB_File if possible, it's much faster
and more efficient.

Comment 3 Olaf Lenz 2003-03-28 01:39:39 UTC
I can confirm this problem on Tru64 (formerly DEC OSF/1 with perl 5.6.1 and SA
2.52).
Comment 4 Klaus Heinz 2003-03-30 09:16:23 UTC
*** Bug 1709 has been marked as a duplicate of this bug. ***
Comment 5 Justin Mason 2003-03-31 15:38:21 UTC
Created attachment 849 [details]
change back to using defined().  I could not observe any speed hit from this change, so it seems safe
Comment 6 Daniel Quinlan 2003-03-31 16:28:49 UTC
OKAY
Comment 7 Theo Van Dinter 2003-03-31 16:40:00 UTC
OKAY: I'd rather leave it as exists and kill the stupid NDBM, but for now it's
ok by me.
Comment 8 Justin Mason 2003-03-31 18:13:45 UTC
ok, now in 2.53.