Bug 9191 follow-up: remove example updatedatabase stanzas
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 11 Dec 2012 13:29:11 +0000 (08:29 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 11 Dec 2012 13:29:11 +0000 (08:29 -0500)
The patch for bug 9191 included example updatedatabase stanzas that
require removal before pushing. This patch also updates the
00-checkdatabase-version.t test so that it will not give
false-positives.

installer/data/mysql/updatedatabase.pl
t/00-checkdatabase-version.t

index 9c13b82..39e4bde 100755 (executable)
@@ -6181,17 +6181,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
-if ( CheckVersion($DBversion) ) {
-    print "Upgrade to $DBversion done (Bug 9191: You shouldn't see this)\n";
-    SetVersion($DBversion);
-}
-
-$DBversion = "3.11.00.XXX";
-if ( CheckVersion($DBversion) ) {
-    print "Upgrade to $DBversion done (Bug 9191: You should see this)\n";
-    SetVersion($DBversion);
-}
-
 =head1 FUNCTIONS
 
 =head2 TableExists($table)
index 3a3df52..8bb3661 100644 (file)
@@ -38,7 +38,12 @@ foreach my $file (@files){
        $line++;
        if (/XXX/i) {
            #two lines are an exception for updatedatabase (routine SetVersion and TransferToNum)
-           next if $file=~ /updatedatabase/ && ( /s\/XXX\$\/999\/;/ || /\$_\[0\]=~ \/XXX\$\/;/ );
+           next
+               if $file =~ /updatedatabase/
+                  && (   /s\/XXX\$\/999\/;/
+                      || /\$_\[0\]=~ \/XXX\$\/;/
+                      || /version contains XXX/
+                      || /\$proposed_version =~ m\/XXX\// );
            $xxx_found = 1;
           last;
        }