SA Bugzilla – Bug 5182
RFE: sa-learn -u should support the non-SQL case, too
Last modified: 2007-07-08 04:50:37 UTC
Using the default, file-based bayesian databases (this problem doesn't seem to occur using sql-based bayes), sa-learn -u uses the invoking user's database files. For example: # sa-learn -D -u rav --spam 16. ... [5289] dbg: bayes: tie-ing to DB file R/O /root/.spamassassin/bayes_toks
-u is only useful in terms of SQL. For DBM mode, you need to either change bayes_path or set your environment's $HOME variable to a different path. The sa-learn docs aren't really clear on that though. Sending to 3.1.8 queue for doc update.
would it not be possible for -u to do this, though? Seems a lot of hassle to go twiddling variables for what must be a relatively common use case.
(In reply to comment #2) > would it not be possible for -u to do this, though? Seems a lot of hassle to go > twiddling variables for what must be a relatively common use case. arguably if sa-learn is being run as root, -u could cause changes to $HOME to point at user's DBs, but then you could just --dbpath which already exists.
I'd have several problems with relying on --dbpath: 1. -u is still there, taunting and confusing me. 2. the user of sa-learn is forced to do the work of understanding which database engine the local spamassassin has been configured for before he can use it. 3. if bayes_path is changed in the local configuration, this must again be repeated in --dbpath, where it should be automatically picked up with a -u. I have to say that I don't actually use sa-learn much, so it's hardly a blocker for me. I do think the current behaviour is very unintuitive though.
Ok, I've added some documentation to sa-learn to make it clear that -u only works for SQL. I'm going to move this ticket to the future milestone queue where at some point we can look at making -u/non-sql attempt to determine a user's location, similar to --dbpath. 3.1: Sending sa-learn.raw Transmitting file data . Committed revision 554332. 3.2: Sending sa-learn.raw Transmitting file data . Committed revision 554333. trunk: Sending sa-learn.raw Transmitting file data . Committed revision 554334.