Bug 4317 - old user_prefs files now fail --lint due to ok_languages being optional
Summary: old user_prefs files now fail --lint due to ok_languages being optional
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P5 minor
Target Milestone: 3.1.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-07 13:31 UTC by Justin Mason
Modified: 2005-06-14 14:58 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Mason 2005-05-07 13:31:08 UTC
Noticed today when I did "spamassassin --lint":

[29600] warn: config: failed to parse line, skipping: ok_languages_en ga fr
[29600] warn: lint: 1 issues detected, please rerun with debug enabled for more
information

I edited '~/.spamassassin/user_prefs' and commented that line, and of course it
worked fine.   The problem is that user_prefs files from previous releases may
contain this line -- we did encourage it, after all -- and so will now always
fail --lint until the user comments it (or enables the new pluginized form).

so:

- is it acceptable to break previously-acceptable, in fact previously
encouraged, user_prefs settings like this?
- can we reenable that plugin by default, for backwards compatibility?
- maybe we should have a way to ignore config settings known to be used by
optional plugins in --lint?

a conundrum ;)
Comment 1 Justin Mason 2005-05-07 17:54:42 UTC
oh, I should point out -- one issue with this is that 'spamassassin --lint' is
often used to check the system-wide settings, e.g. from the rules-du-jour
scripts.  this would be a case where a previously-working 'user_prefs' file
stops working, which would interfere with that.
Comment 2 Justin Mason 2005-05-10 19:50:57 UTC
need to think about this a little for 3.1.0
Comment 3 Justin Mason 2005-06-07 20:47:29 UTC
I'm leaning towards having an array of settings that were previously part of
core,  are now in optional plugins, and will be ignored for --lint, in Conf.pm.

this will only affect --lint warnings, and will not interfere with their use if
the plugin *is* loaded.

thoughts?
Comment 4 Loren Wilton 2005-06-07 21:52:30 UTC
Subject: Re:  old user_prefs files now fail --lint due to ok_languages being optional

Could lint be arranged to give a warning like "option 'foo_blarf' only
applies to the Wazzit::DNS plugin which is not currently loaded"?

This way you are admitting the option is meaningful rather than misspelled,
but also hinting that it isn't useful in the current configuration.  (And
the user might have had every reason to believe that it was meaningful, not
realizing there is another plugin to load.)

Comment 5 Theo Van Dinter 2005-06-08 08:50:31 UTC
Subject: Re:  old user_prefs files now fail --lint due to ok_languages being optional

On Tue, Jun 07, 2005 at 09:52:30PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> Could lint be arranged to give a warning like "option 'foo_blarf' only
> applies to the Wazzit::DNS plugin which is not currently loaded"?

How would the default SA know what options go with what plugins without
loading the plugin?

Comment 6 Justin Mason 2005-06-08 09:51:48 UTC
'How would the default SA know what options go with what plugins without
loading the plugin?'

by having a list in Conf listing the now-moved-to-plugins set of old settings,
as discussed in comment #3.  personally I'd prefer to just list the settings,
and not have to keep track of the plugin names there too; the warning could just be

  setting ignored (no longer in core, now in optional plugin): ok_languages

--j.
Comment 7 Michael Parker 2005-06-08 10:01:54 UTC
Subject: Re:  old user_prefs files now fail --lint due to ok_languages
 being optional

bugzilla-daemon@bugzilla.spamassassin.org wrote:

>by having a list in Conf listing the now-moved-to-plugins set of old settings,
>as discussed in comment #3.  personally I'd prefer to just list the settings,
>and not have to keep track of the plugin names there too; the warning could just be
>
>  setting ignored (no longer in core, now in optional plugin): ok_languages
>
>  
>

This doesn't scale to third-party plugins that we have no control over.

Comment 8 Justin Mason 2005-06-08 10:09:30 UTC
yes.  this is for a specific subset of config settings, to quote comment 1:

'user_prefs files from previous releases may
contain this line -- we did encourage it, after all'

specifically, settings that *were* part of core, but moved to optional but
disabled-by-default plugins in a later release.
Comment 9 Theo Van Dinter 2005-06-08 11:03:02 UTC
Subject: Re:  old user_prefs files now fail --lint due to ok_languages being optional

On Wed, Jun 08, 2005 at 10:09:30AM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> specifically, settings that *were* part of core, but moved to optional but
> disabled-by-default plugins in a later release.

This will also confuse users and net us a bunch of tickets:

- I have [insert config here] set in my local.cf, and --lint doesn't show any
  errors, but the setting isn't working.  Why not?

Then we'll have to explain that the plugin isn't loaded, but we accept and
ignore the old options.  I'd rather have stuff not work, then when they run
--lint it tells them that old options aren't available anymore.

If we didn't ignore the option, we'd have to alert the user about it (which I
think is a bad idea, it should be --lint only imo), which we already do:

[32511] info: config: failed to parse line, skipping: ok_languages en

Granted, instead of saying it failed to parse it could say "X functionality
moved to plugin", but that's not going to help most people anyway.

Comment 10 Loren Wilton 2005-06-09 21:52:42 UTC
Subject: Re:  old user_prefs files now fail --lint due to ok_languages being optional

> How would the default SA know what options go with what plugins without
> loading the plugin?

For the standard plugins, from someone coding up a list of the options that
belong to the plugins.  Since most of these plugins seem to be replacements
for existing syntax this really shouldn't be too hard.

Comment 11 Justin Mason 2005-06-14 22:58:17 UTC
Sending        lib/Mail/SpamAssassin/Conf/Parser.pm
Sending        lib/Mail/SpamAssassin/Conf.pm
Transmitting file data ..
Committed revision 190711.