From e38b21fa39773c3aceec3b98f698c4488d08f758 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 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 Signed-off-by: Tomas Cohen Arazi --- 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 b2c08217f7..48c8122573 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10307,9 +10307,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$/ ) { -- 2.39.5