[Rt-commit] rt branch, 4.0/error-ignored-in-upgrade-fix, created. rt-4.0.0-315-g3c7a1ad
? sunnavy
sunnavy at bestpractical.com
Wed May 18 03:55:35 EDT 2011
The branch, 4.0/error-ignored-in-upgrade-fix has been created
at 3c7a1ada1848ef148f21127795b8b1c8d28486ca (commit)
- Log -----------------------------------------------------------------
commit 3c7a1ada1848ef148f21127795b8b1c8d28486ca
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed May 18 15:27:58 2011 +0800
return error once we encounter a problem in upgrade
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index ff0b8d3..ac30f01 100755
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -373,19 +373,23 @@ sub action_upgrade {
print "\nIT'S VERY IMPORTANT TO BACK UP BEFORE THIS STEP\n\n";
_yesno() or exit(-2) unless $args{'force'};
+ my ( $ret, $msg );
foreach my $n ( 0..$#versions ) {
my $v = $versions[$n];
my @back = grep {-e $_} map {"$base_dir/$versions[$_]/backcompat"} $n+1..$#versions;
print "Processing $v\n";
my %tmp = (%args, datadir => "$base_dir/$v", datafile => undef, backcompat => \@back);
if ( -e "$base_dir/$v/schema.$db_type" ) {
- action_schema( %tmp );
+ ( $ret, $msg ) = action_schema( %tmp );
+ return ( $ret, $msg ) unless $ret;
}
if ( -e "$base_dir/$v/acl.$db_type" ) {
- action_acl( %tmp );
+ ( $ret, $msg ) = action_acl( %tmp );
+ return ( $ret, $msg ) unless $ret;
}
if ( -e "$base_dir/$v/content" ) {
- action_insert( %tmp );
+ ( $ret, $msg ) = action_insert( %tmp );
+ return ( $ret, $msg ) unless $ret;
}
}
return 1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list