You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2006/05/31 20:28:54 UTC
[Bug 4932] New: userprefs_dir not created anymore / userprefs warning incorrect
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
Summary: userprefs_dir not created anymore / userprefs warning
incorrect
Product: Spamassassin
Version: 3.1.2
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Libraries
AssignedTo: dev@spamassassin.apache.org
ReportedBy: felicity@apache.org
I was noticing that a previous change I made (r386260 per bug 4827) doesn't work right in M::SA::init(),
but don't have time to directly fix it right now:
old:
# user prefs file
$fname = $self->{userprefs_filename};
$fname ||= $self->first_existing_path (@default_userprefs_path);
if (defined $fname) {
if (!-f $fname && !$self->{dont_copy_prefs} && !$self->create_default_prefs($fname)) {
warn "config: failed to create default user preference file $fname\n";
}
}
new:
# user prefs file
$fname = $self->{userprefs_filename};
$fname ||= $self->first_existing_path (@default_userprefs_path);
if (defined $fname) {
if (!-f $fname && !$self->{dont_copy_prefs} && !$self->create_default_prefs($fname)) {
warn "config: failed to create default user preference file $fname\n";
}
}
else {
warn "config: could not find userprefs file\n";
}
the problem is that in the old code, $fname would always be defined as the last entry of
@default_userprefs_path, so it would then get created if necessary. In the new code, if the prefs don't
exist, a warn is thrown and that's the end of it. D'oh! So if it doesn't already exist, we should look at
$default_userprefs_path[-1], try to create it if necessary, etc.
I think the warn can just go away at that point since the 4 states (exists/use it, exists/don't use it,
doesn't exist/use it, doesn't exist/don't use it) are covered already.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] [review] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
parkerm@pobox.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status Whiteboard|needs 2 votes for 3.1 branch|needs 1 votes for 3.1 branch
------- Additional Comments From parkerm@pobox.com 2006-05-31 22:01 -------
+1 still
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
felicity@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Undefined |3.1.3
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
------- Additional Comments From felicity@apache.org 2006-05-31 19:22 -------
Created an attachment (id=3533)
--> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3533&action=view)
suggested patch
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] [review] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
------- Additional Comments From jm@jmason.org 2006-06-01 14:19 -------
+1. let's not put this into 3.1.3 though... (cough)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] [review] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
felicity@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #3534 is|0 |1
obsolete| |
------- Additional Comments From felicity@apache.org 2006-05-31 21:36 -------
Created an attachment (id=3535)
--> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3535&action=view)
third go?
from bug 4923: the userstate_dir needs to be created, even if the preferences
aren't going to be copied for things like bayes, etc.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] [review] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
------- Additional Comments From parkerm@pobox.com 2006-05-31 19:48 -------
+1 for 3.1.3
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
felicity@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #3533 is|0 |1
obsolete| |
------- Additional Comments From felicity@apache.org 2006-05-31 19:36 -------
Created an attachment (id=3534)
--> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3534&action=view)
corrected patch
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] [review] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
felicity@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Status Whiteboard|needs 1 votes for 3.1 branch|ready to commit
------- Additional Comments From felicity@apache.org 2006-06-01 14:35 -------
Sending lib/Mail/SpamAssassin.pm
Transmitting file data .
Committed revision 410869.
:)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] [review] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
felicity@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|userprefs_dir not created |[review] userprefs_dir not
|anymore / userprefs warning |created anymore / userprefs
|incorrect |warning incorrect
Status Whiteboard| |needs 2 votes for 3.1 branch
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
felicity@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
------- Additional Comments From felicity@apache.org 2006-05-31 19:35 -------
>From what I can tell, this issue stops the userprefs file from being created at all, which kind of sucks.
<sigh> really ought to get this into 3.1.3...
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4932] [review] userprefs_dir not created anymore / userprefs warning incorrect
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932
felicity@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |4923
nThis| |
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.