Bug 5336 - [review] sa-learn issues warning if called without a target
Summary: [review] sa-learn issues warning if called without a target
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: 3.1.8
Hardware: Other Linux
: P5 trivial
Target Milestone: 3.1.10
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard: ready for commit
Keywords:
: 5363 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-15 11:37 UTC by Raul Dias
Modified: 2007-06-18 14:47 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
suggested patch patch None Theo Van Dinter [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Raul Dias 2007-02-15 11:37:42 UTC
if sa-learn is called without a target (e.g. for stdin input),
the message is warned:

archive-iterator: invalid (undef) format in target list, 2
at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/ArchiveIterator.pm
line 727, <STDIN> line 1.

A simple solution right now is to specify '-' as the target when using stdin.

OBS: 3.1.8 is not available in bugzilla yet.
Comment 1 Theo Van Dinter 2007-02-15 11:45:17 UTC
(In reply to comment #0)
> archive-iterator: invalid (undef) format in target list, 2
> at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/ArchiveIterator.pm
> line 727, <STDIN> line 1.
> 
> A simple solution right now is to specify '-' as the target when using stdin.

I have a patch, will be up shortly.  Can't believe no one caught this in
testing.  <sigh>

> OBS: 3.1.8 is not available in bugzilla yet.

there is now. :)
Comment 2 Theo Van Dinter 2007-02-15 11:49:15 UTC
Created attachment 3866 [details]
suggested patch
Comment 3 Olivier Brisson 2007-02-18 22:22:58 UTC
Same problem on FreeBSD with the last version from ports
(p5-Mail-SpamAssassin-3.1.8/)
Comment 4 Olivier Brisson 2007-02-18 22:29:01 UTC
(In reply to comment #2)
> Created an attachment (id=3866) [edit]
> suggested patch
> 

Your patch works for me. I just tested it on about 100 spams and had no errors.
Thank you very much!

Olivier Brisson

Comment 5 Doc Schneider 2007-02-21 14:52:20 UTC
+1 Works for me. 
Comment 6 Justin Mason 2007-02-21 15:17:34 UTC
+1

btw I suggest a test suite might be a good idea....
Comment 7 Daryl C. W. O'Shea 2007-03-05 11:24:46 UTC
*** Bug 5363 has been marked as a duplicate of this bug. ***
Comment 8 Theo Van Dinter 2007-06-11 09:08:08 UTC
committed, finally:

Sending        sa-learn.raw
Transmitting file data .
Committed revision 546181.
Comment 9 Theo Van Dinter 2007-06-18 14:47:31 UTC
this was actually resolved post-3.1.9 tarball, so it's really 3.1.10. :(