You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2014/12/08 19:18:36 UTC

svn commit: r1643877 - /spamassassin/trunk/sa-update.raw

Author: mmartinec
Date: Mon Dec  8 18:18:35 2014
New Revision: 1643877

URL: http://svn.apache.org/r1643877
Log:
Bug 7111: sa-update: wrong exit code with --checkonly (does not find new versions)

Modified:
    spamassassin/trunk/sa-update.raw

Modified: spamassassin/trunk/sa-update.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/sa-update.raw?rev=1643877&r1=1643876&r2=1643877&view=diff
==============================================================================
--- spamassassin/trunk/sa-update.raw (original)
+++ spamassassin/trunk/sa-update.raw Mon Dec  8 18:18:35 2014
@@ -518,6 +518,7 @@ foreach my $channel (@channels) {
 
     if ( defined $opt{'checkonly'} ) {            
       dbg("channel: $channel: --install and --checkonly, claiming update available");
+      $channel_successes++;
       next;
     }
 
@@ -558,6 +559,7 @@ foreach my $channel (@channels) {
     if ( defined $opt{'checkonly'} ) {            
       dbg("channel: $channel: update available, not downloading ".
           "in checkonly mode");
+      $channel_successes++;
       next;
     }
 
@@ -1995,8 +1997,10 @@ Print sa-update version and exit.
 
 =head1 EXIT CODES
 
-An exit code of C<0> means an update was available, and was downloaded and
-installed successfully if --checkonly was not specified.
+In absence of a --checkonly option, an exit code of C<0> means:
+an update was available, and was downloaded and installed successfully.
+If --checkonly was specified, an exit code of C<0> means: an update was
+available.
 
 An exit code of C<1> means no fresh updates were available.