Make sure to do priority app upgrades first

Otherwise those apps might not be loaded when the others app migrations
are running. The previous loading of authentication apps in the upgrade
step never worked as it just returns in maintenance mode

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2021-01-08 12:27:51 +01:00 committed by backportbot[bot]
parent f5c98642f7
commit 16850b940f
1 changed files with 2 additions and 2 deletions

View File

@ -262,7 +262,6 @@ class Updater extends BasicEmitter {
$this->upgradeAppStoreApps($autoDisabledApps, true); $this->upgradeAppStoreApps($autoDisabledApps, true);
// install new shipped apps on upgrade // install new shipped apps on upgrade
OC_App::loadApps(['authentication']);
$errors = Installer::installShippedApps(true); $errors = Installer::installShippedApps(true);
foreach ($errors as $appId => $exception) { foreach ($errors as $appId => $exception) {
/** @var \Exception $exception */ /** @var \Exception $exception */
@ -368,7 +367,8 @@ class Updater extends BasicEmitter {
$stacks[$pseudoOtherType][] = $appId; $stacks[$pseudoOtherType][] = $appId;
} }
} }
foreach ($stacks as $type => $stack) { foreach (array_merge($priorityTypes, [$pseudoOtherType]) as $type) {
$stack = $stacks[$type];
foreach ($stack as $appId) { foreach ($stack as $appId) {
if (\OC_App::shouldUpgrade($appId)) { if (\OC_App::shouldUpgrade($appId)) {
$this->emit('\OC\Updater', 'appUpgradeStarted', [$appId, \OC_App::getAppVersion($appId)]); $this->emit('\OC\Updater', 'appUpgradeStarted', [$appId, \OC_App::getAppVersion($appId)]);