--- Comment #5 from Mark Martinec <Mark.Martinec@ijs.si> 2011-09-05 17:49:11 UTC ---
Intended as a quick test of the supplied patch and to explore some other
failure modes, and realizing that plenty of system calls in sa-update
were still ignoring a status return, I ended up with a biggish update
to sa-update and some of the related utility code. I believe it is
an improvement, but further improvement would still be desirable.

Here are the changes:
- sa-update can now take multiple -v or --verbose options to increase
verbosity; currently one or two levels are in use: two levels
add reporting on a DNS query and HTTP GET requests;
- allow Mail::SpamAssassin::Util::secure_tmpfile to signal a
failure, adjust callers for this;
- Message.pm: test $msg->{'raw'} for defined(), not for exists();
do not store a file handle there if it is not defined;
- sub secure_tmpfile: only retry on failures which are expected
not to be permanent (e.g. makes no point in trying 20 times
to create a file when a status is always a "Permission denied";
- sub secure_tmpfile: do not bother with umask, sysopen specifies
the mode explicitly;
- sa-update: add several missing status tests to system calls,
improve debug and verbose logging;
- sa-update: use eval{} in the 'try/rollback' idiom to simplify
diagnostics;
- sa-update: ignore non-'TXT' and empty fields in a DNS reply;
- sa-update: better report gpg process crashes and failure exit status;
- sa-update: some style and terminology changes to go along the
rest of the modules (like: || warn -> or warn; can't -> cannot);