@@ -, +, @@ RunRemainingDevUpdates, so only official db revs. This is the default. the local pref listing all recently applied dev updates. ONLY use this if you know what you are doing! --- installer/data/mysql/updatedatabase.pl | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -50,6 +50,7 @@ use constant ATOMICUPD_PREF => '_LocalAtomicUpdates'; my $debug = 0; my $aupd = { #hash for atomic updates location => C4::Context->config('intranetdir')."/installer/data/mysql/atomicupdate", + mode => C4::Context->preference('DevUpdateControl') // 'PROD', remember => C4::Context->preference(ATOMICUPD_PREF)//'', skipfiles => { 'Bug-4246-Talking-Tech-itiva-phone-notifications.pl' => 1, @@ -8864,7 +8865,7 @@ if ( CheckVersion($DBversion) ) { # This point marks the end of the approved database revisions. # The following line runs proposed patches found in atomicupdate. On a # production system, it will [should] not find any. -RunRemainingAtomicUpdates( $aupd ); +RunRemainingAtomicUpdates( $aupd ) if $aupd->{mode} ne 'PROD'; =head1 FUNCTIONS @@ -8888,7 +8889,8 @@ sub RunRemainingAtomicUpdates { print "Skipping $upd as installed official db rev\n"; next; } - if( $atomicupd->{remember} =~ /(^|;)$upd;/ ) { + if( $atomicupd->{mode} ne 'ALWAYS' && + $atomicupd->{remember} =~ /(^|;)$upd;/ ) { #Skip files that have recently been applied #Note that an official db rev erases this list print "Skipping $upd as recently applied dev update\n"; @@ -8946,7 +8948,7 @@ sub ExecDBRev { print "Dev upgrade $file done\n"; _atomic_memory( $atomicupd, $file ) if $rv; } else { - _atomic_memory( $atomicupd ); #Official db rev clears the atomic pref + _atomic_memory( $atomicupd ); #Official dbrev may clear atomic pref SetVersion($version); print "Upgrade to $version done (Bug $bugno - $descr)\n"; } @@ -8954,6 +8956,10 @@ sub ExecDBRev { sub _atomic_memory { my ( $atomicupd, $upd ) = @_; + + return if $atomicupd->{mode} eq 'ALWAYS'; # ignores the pref + return if !$upd && $atomicupd->{mode} eq 'TRACK'; # no reset + $atomicupd->{remember}= $upd? $atomicupd->{remember}."$upd;": ''; C4::Context->set_preference( ATOMICUPD_PREF, $atomicupd->{remember} ); } --