Bugzilla – Attachment 37389 Details for
Bug 13893
Add ability to execute perl scripts in atomicupdates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13893 - Add ability to execute perl scripts in atomicupdates
Bug-13893---Add-ability-to-execute-perl-scripts-in.patch (text/plain), 2.18 KB, created by
Mark Tompsett
on 2015-03-30 22:41:41 UTC
(
hide
)
Description:
Bug 13893 - Add ability to execute perl scripts in atomicupdates
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-03-30 22:41:41 UTC
Size:
2.18 KB
patch
obsolete
>From 640bc8fc8a4237875c968412da468ca79c2bf53c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 23 Mar 2015 09:19:03 -0400 >Subject: [PATCH] Bug 13893 - Add ability to execute perl scripts in > atomicupdates > >Bug 13068 adds the ability to execute sql files from atomicupdates for >in process developments to reduce merge conflicts. We need to extend >this ability further to be able to handle perl code. > >Revised Test Plan >----------------- >1) Apply bug 13068 if not pushed to master yet. > -- I had to manually rebase the updatedatabase.pl, > but it wasn't hard. Asked for a rebase on the bug. >2) Apply this patch set >3) Run updatedatabase.pl > -- Expect output to be similar to: >--- BEGIN OUTPUT --- >$ ./installer/data/mysql/updatedatabase.pl >DEV atomic update : test_bz13068.sql >Upgrade to XXX done (Bug 13893 - Add ability to execute perl scripts in atomicupdates) >--- END OUTPUT --- > >4) Run koha qa test tools. > -- only need to check last commit (-c 1), because first commit is a > sample file which shouldn't be pushed. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > installer/data/mysql/updatedatabase.pl | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 88e031f..ac6f9c6 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -9951,10 +9951,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; > opendir( my $dirh, $update_dir ); > while ( my $file = readdir $dirh ) { >- next unless $file =~ /\.sql$/; # skip non SQL files >- print "DEV atomic update : $file \n"; >- my $installer = C4::Installer->new(); >- my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; >+ if ( $file =~ /\.sql$/ ) { # skip non SQL files >+ print "DEV atomic update : $file \n"; >+ my $installer = C4::Installer->new(); >+ my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; >+ } elsif ( $file =~ /\.perl$/ ) { >+ do $update_dir . $file; >+ } > } > > >-- >1.9.1
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 13893
:
37120
|
37121
|
37122
|
37123
|
37389
|
37997
|
37998