From 50d7baa783251c47e55a3d7f5bfb7525384011ad Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 16 Apr 2015 15:34:25 +0200 Subject: [PATCH] Bug 13893: [QA Follow-up] Move print statement, sort files in loop Content-Type: text/plain; charset=utf-8 Just moving the print statement for DEV updates to show them too for the new perl format. In the loop opendir..readdir is used; this might not be always in the expected order. I added a sort to force the order. Signed-off-by: Marcel de Rooy --- installer/data/mysql/updatedatabase.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4f4558b..d78e4f6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10031,9 +10031,10 @@ if ( CheckVersion($DBversion) ) { my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; opendir( my $dirh, $update_dir ); -while ( my $file = readdir $dirh ) { - if ( $file =~ /\.sql$/ ) { # skip non SQL files - print "DEV atomic update : $file \n"; +foreach my $file ( sort readdir $dirh ) { + next if $file !~ /\.(sql|perl)$/; #skip other files + print "DEV atomic update: $file\n"; + if ( $file =~ /\.sql$/ ) { my $installer = C4::Installer->new(); my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; } elsif ( $file =~ /\.perl$/ ) { -- 1.7.10.4