|
Lines 9745-9756
sub ExecDBRev {
Link Here
|
| 9745 |
$rv = 1; |
9745 |
$rv = 1; |
| 9746 |
} elsif( $file =~ /\.pl$/ ) { |
9746 |
} elsif( $file =~ /\.pl$/ ) { |
| 9747 |
#Run perl script |
9747 |
#Run perl script |
|
|
9748 |
my $dbh = C4::Context->dbh; |
| 9749 |
$dbh->{RaiseError} = 1; |
| 9748 |
$rv = do $atomicupd->{location}. "/$file"; |
9750 |
$rv = do $atomicupd->{location}. "/$file"; |
| 9749 |
if( !$rv ) { |
9751 |
if( !$rv ) { |
| 9750 |
print "ERROR: $@\n" if $@; |
9752 |
my $msg= $@? "ERROR: $@": ($!? "ERROR: $!\n": ''); |
| 9751 |
print "ERROR: $!\n" if $! && !$@; |
9753 |
chomp $msg; |
| 9752 |
$rv = 1 if !$! && !$@; #apparently, the file does not end with 1; |
9754 |
print "$msg\n" if $msg; |
|
|
9755 |
$rv = 1 if !$msg; #apparently, the file does not end with 1; |
| 9753 |
} |
9756 |
} |
|
|
9757 |
$dbh->{RaiseError} = 0; |
| 9754 |
} elsif( $file =~ /\.sql$/ ) { |
9758 |
} elsif( $file =~ /\.sql$/ ) { |
| 9755 |
#Run sql file via installer |
9759 |
#Run sql file via installer |
| 9756 |
my $installer = C4::Installer->new(); |
9760 |
my $installer = C4::Installer->new(); |
|
Lines 9762-9768
sub ExecDBRev {
Link Here
|
| 9762 |
} |
9766 |
} |
| 9763 |
|
9767 |
|
| 9764 |
if( $devrun ) { |
9768 |
if( $devrun ) { |
| 9765 |
print "Dev upgrade $file done\n"; |
9769 |
print "Dev upgrade $file ".( $rv? 'done': 'failed' )."\n"; |
| 9766 |
_atomic_memory( $atomicupd, $file ) if $rv; |
9770 |
_atomic_memory( $atomicupd, $file ) if $rv; |
| 9767 |
} else { |
9771 |
} else { |
| 9768 |
_atomic_memory( $atomicupd ); #Official dbrev may clear atomic pref |
9772 |
_atomic_memory( $atomicupd ); #Official dbrev may clear atomic pref |
| 9769 |
- |
|
|