This reverts commit
7ac1bc35372990520a7c67870b2c702c41bbebcc.
On a kohadevbox:
Error flock (1) on
'/home/vagrant/kohaclone/installer/data/mysql/atomicupdate/bug_xxxx.perl':
No locks available at installer/data/mysql/updatedatabase.pl line 13637.
This is because Path::Tiny->slurp[_utf8] uses flocks which does not work
with NFS
Test plan:
Execute a .perl atomic update file on a kohadevbox
=> Without this patch you should get the flock error
=> With this patch the update should work fine
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
required => 1,
min_ver => '0.28',
},
- 'Path::Tiny' => {
- usage => 'core',
- required => 1,
- min_ver => '0.058',
- },
};
1;
use File::Path qw[remove_tree]; # perl core module
use File::Spec;
-use Path::Tiny;
+use File::Slurp;
# FIXME - The user might be installing a new database, so can't rely
# on /etc/koha.conf anyway.
my $installer = C4::Installer->new();
my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1;
} elsif ( $file =~ /\.perl$/ ) {
- my $code = path( $update_dir . $file )->slurp_utf8;
+ my $code = read_file( $update_dir . $file );
eval $code;
say "Atomic update generated errors: $@" if $@;
}