@@ -, +, @@ --- installer/data/mysql/updatedatabase.pl | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -9732,12 +9732,16 @@ sub ExecDBRev { $rv = 1; } elsif( $file =~ /\.pl$/ ) { #Run perl script + my $dbh = C4::Context->dbh; + $dbh->{RaiseError} = 1; $rv = do $atomicupd->{location}. "/$file"; if( !$rv ) { - print "ERROR: $@\n" if $@; - print "ERROR: $!\n" if $! && !$@; - $rv = 1 if !$! && !$@; #apparently, the file does not end with 1; + my $msg= $@? "ERROR: $@": ($!? "ERROR: $!\n": ''); + chomp $msg; + print "$msg\n" if $msg; + $rv = 1 if !$msg; #apparently, the file does not end with 1; } + $dbh->{RaiseError} = 0; } elsif( $file =~ /\.sql$/ ) { #Run sql file via installer my $installer = C4::Installer->new(); @@ -9749,7 +9753,7 @@ sub ExecDBRev { } if( $devrun ) { - print "Dev upgrade $file done\n"; + print "Dev upgrade $file ".( $rv? 'done': 'failed' )."\n"; _atomic_memory( $atomicupd, $file ) if $rv; } else { _atomic_memory( $atomicupd ); #Official dbrev may clear atomic pref --