Fix sbin/upgrade.pl so that it handles forking upgrade scripts without
overwriting the config file changes in earlier upgrade scripts.
This commit is contained in:
parent
ea253f3fae
commit
208ea281b7
3 changed files with 22 additions and 1 deletions
|
|
@ -19,6 +19,7 @@
|
|||
- fixed #9352: Account activation message MIA
|
||||
- fixed #9046: Wiki tabs all combined (David Delikat)
|
||||
- refixed #9147: Misspellings in Account
|
||||
- fixed #9348: Required Upgrade Step Not Documented - 7.6.0
|
||||
|
||||
7.6.7
|
||||
- fixed #9263: Thingy possibleValues processing, and List type autodetection.
|
||||
|
|
|
|||
|
|
@ -64,6 +64,24 @@ These subroutines are available from this package:
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 clearCache ( )
|
||||
|
||||
Clear the cache of in-memory configuration files. This is required by the upgrade script, which
|
||||
forks to run each upgrade. When the child is reaped, the original is untouched, so that the
|
||||
next script in the line recieves an old, in-memory config, essentially undoing any config
|
||||
changes in the first upgrade script.
|
||||
|
||||
This is a class method.
|
||||
|
||||
=cut
|
||||
|
||||
sub clearCache {
|
||||
my $class = shift;
|
||||
%config = ();
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getCookieName ( )
|
||||
|
||||
Returns the cookie name defined in the config file. Returns "wgSession" if one isn't defined.
|
||||
|
|
|
|||
|
|
@ -243,10 +243,12 @@ foreach my $filename (keys %config) {
|
|||
print "\tProcessing upgrade executable failed!\n";
|
||||
fatalError();
|
||||
}
|
||||
##Do a dummy load of the config
|
||||
WebGUI::Config->clearCache();
|
||||
}
|
||||
$config{$filename}{version} = $upgrade{$upgrade}{to};
|
||||
$notRun = 0;
|
||||
sleep 1; # Sleep a second to avoid adding asset revisions too quickly
|
||||
sleep 1; # Sleep a second to avoid adding asset revisions too quickly
|
||||
}
|
||||
my $session = WebGUI::Session->open($webguiRoot,$filename);
|
||||
print "\tSetting site upgrade completed..." unless ($quiet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue