[Rt-commit] rt branch, 4.0/version-words-not-mandatory-in-upgrade, created. rt-4.0.10-33-g5b94723

Alex Vandiver alexmv at bestpractical.com
Fri Feb 8 20:39:45 EST 2013


The branch, 4.0/version-words-not-mandatory-in-upgrade has been created
        at  5b94723ec2d4fc0f9771a19a4122ab1ff707aedc (commit)

- Log -----------------------------------------------------------------
commit 5b94723ec2d4fc0f9771a19a4122ab1ff707aedc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Feb 8 20:33:39 2013 -0500

    Fix version parsing in rt-setup-database
    
    ad6a1a8 changed version parsing to use the list of possible "version
    words" in RT::Handle.  Unfortunately, it made their presence mandatory,
    in doing so.

diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index b1e5102..164fe44 100644
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -317,7 +317,7 @@ sub action_upgrade {
         $upgrading_from = scalar <STDIN>;
         chomp $upgrading_from;
         $upgrading_from =~ s/\s+//g;
-    } while $upgrading_from !~ /^\d+\.\d+\.\d+(?:$version_word_regex)\d*$/;
+    } while $upgrading_from !~ /^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/;
 
     my $upgrading_to = $RT::VERSION;
     return (0, "The current version $upgrading_to is lower than $upgrading_from")
@@ -352,7 +352,7 @@ sub action_upgrade {
             chomp $custom_upgrading_to;
             $custom_upgrading_to =~ s/\s+//g;
             last unless $custom_upgrading_to;
-        } while $custom_upgrading_to !~ /^\d+\.\d+\.\d+(?:$version_word_regex)\d*$/;
+        } while $custom_upgrading_to !~ /^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/;
 
         if ( $custom_upgrading_to ) {
             return (

-----------------------------------------------------------------------


More information about the Rt-commit mailing list