Bugzilla – Attachment 58196 Details for
Bug 17666
.perl atomic update does not work under kohadevbox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17666: Revert "Bug 16685 [QA Followup] - Use Path::Tiny::slurp instead of File::Slurp"
Bug-17666-Revert-Bug-16685-QA-Followup---Use-PathT.patch (text/plain), 2.36 KB, created by
Marcel de Rooy
on 2016-12-15 07:52:09 UTC
(
hide
)
Description:
Bug 17666: Revert "Bug 16685 [QA Followup] - Use Path::Tiny::slurp instead of File::Slurp"
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-12-15 07:52:09 UTC
Size:
2.36 KB
patch
obsolete
>From e712778b6c9bf9f69d3907692467a43c44efcedd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 12 Dec 2016 21:44:59 +0000 >Subject: [PATCH] Bug 17666: Revert "Bug 16685 [QA Followup] - Use > Path::Tiny::slurp instead of File::Slurp" >Content-Type: text/plain; charset=utf-8 > >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> >--- > C4/Installer/PerlDependencies.pm | 5 ----- > installer/data/mysql/updatedatabase.pl | 4 ++-- > 2 files changed, 2 insertions(+), 7 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index b531e6c..83d8b19 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -852,11 +852,6 @@ our $PERL_DEPS = { > required => 1, > min_ver => '0.28', > }, >- 'Path::Tiny' => { >- usage => 'core', >- required => 1, >- min_ver => '0.058', >- }, > }; > > 1; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index dd34053..fe81533 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -47,7 +47,7 @@ use MARC::File::XML ( BinaryEncoding => 'utf8' ); > > 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. >@@ -13720,7 +13720,7 @@ foreach my $file ( sort readdir $dirh ) { > 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 $@; > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17666
:
57727
|
58151
|
58193
| 58196 |
58197