You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2008/03/18 11:49:52 UTC

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

Author: jm
Date: Tue Mar 18 03:49:44 2008
New Revision: 638314

URL: http://svn.apache.org/viewvc?rev=638314&view=rev
Log:
sa-update --install: relax 6-digit requirement to 3-digits; also ensure we use a digit block nearest the end of the string

Modified:
    spamassassin/trunk/sa-update.raw

Modified: spamassassin/trunk/sa-update.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/sa-update.raw?rev=638314&r1=638313&r2=638314&view=diff
==============================================================================
--- spamassassin/trunk/sa-update.raw (original)
+++ spamassassin/trunk/sa-update.raw Tue Mar 18 03:49:44 2008
@@ -456,9 +456,11 @@
     }
 
   } else {  # $instfile
-    if ($instfile !~ /(\d{6,})/) {
+    # the /.*/ ensures we use the 3-digit string nearest to the end of string, otherwise
+    # we might pick up something from the middle of the directory path
+    if ($instfile !~ /(?:.*\D|^)(\d{3,})/) {        
       # this is a requirement
-      die "channel: $channel: --install file $instfile does not contain a 6-digit version number!\n";
+      die "channel: $channel: --install file $instfile does not contain a 3-digit version number!\n";
     }
     $newV = $1;
 
@@ -1431,7 +1433,7 @@
 Install updates from the named tar.gz file, instead of performing DNS lookups
 and HTTP invocations.  Files named B<file>.sha1 and B<file>.asc will be used
 for the SHA-1 and GPG signature, respectively.  The filename provided must
-contain a version number of at least 6 digits.
+contain a version number of at least 3 digits.
 
 Multiple B<--install> switches can be provided, with each matching one
 B<--channel>.