[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-37-g118e340
Alex Vandiver
alexmv at bestpractical.com
Thu Sep 30 15:21:22 EDT 2010
The branch, 3.9-trunk has been updated
via 118e340fd3ec6d629e635127b666fe5175e4a92b (commit)
from d5b98f7040745786819b0748e0512e912c763c69 (commit)
Summary of changes:
sbin/rt-setup-database.in | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 118e340fd3ec6d629e635127b666fe5175e4a92b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Sep 30 15:24:32 2010 -0400
Make upgrading tool work before we tag the new version
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index 5e1e746..7c11b04 100755
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -294,7 +294,12 @@ sub action_upgrade {
return (1, "The version $upgrading_to you're upgrading to is up to date")
if RT::Handle::cmp_version( $upgrading_from, $upgrading_to ) == 0;
- my @versions = get_versions_from_to($base_dir, $upgrading_from, $upgrading_to);
+ my @versions = get_versions_from_to($base_dir, $upgrading_from, undef);
+ if (RT::Handle::cmp_version($versions[-1], $upgrading_to) > 0) {
+ print "\n***** There are upgrades for $versions[-1], which is later than $upgrading_to,\n";
+ print "***** which you are nominally upgrading to. Upgrading to $versions[-1] instead.\n";
+ $upgrading_to = $versions[-1];
+ }
return (1, "No DB changes between $upgrading_from and $upgrading_to")
unless @versions;
@@ -369,7 +374,7 @@ sub get_versions_from_to {
closedir $dh;
return
- grep RT::Handle::cmp_version($_, $to) <= 0,
+ grep defined $to ? RT::Handle::cmp_version($_, $to) <= 0 : 1,
grep RT::Handle::cmp_version($_, $from) > 0,
sort RT::Handle::cmp_version @versions;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list