[Pkg-owncloud-commits] [owncloud] 84/205: [upgrade] print update message before running the update code

David Prévot taffit at moszumanska.debian.org
Thu Jul 2 17:36:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 1ba9fd3ada07c42b1151de64004702acf22382d1
Author: Morris Jobke <hey at morrisjobke.de>
Date:   Tue Jun 23 10:43:45 2015 +0200

    [upgrade] print update message before running the update code
    
    * otherwise you don't know during which app update something failed
---
 core/command/upgrade.php | 3 +++
 lib/private/updater.php  | 1 +
 2 files changed, 4 insertions(+)

diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index 2d6394f..58e98e2 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -158,6 +158,9 @@ class Upgrade extends Command {
 			$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($output) {
 				$output->writeln('<info>Checked database schema update for apps</info>');
 			});
+			$updater->listen('\OC\Updater', 'appUpgradeStarted', function ($app, $version) use ($output) {
+				$output->writeln("<info>Updating <$app> ...</info>");
+			});
 			$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($output) {
 				$output->writeln("<info>Updated <$app> to $version</info>");
 			});
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 7f1a493..bd9e8a6 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -386,6 +386,7 @@ class Updater extends BasicEmitter {
 		foreach ($stacks as $type => $stack) {
 			foreach ($stack as $appId) {
 				if (\OC_App::shouldUpgrade($appId)) {
+					$this->emit('\OC\Updater', 'appUpgradeStarted', array($appId, \OC_App::getAppVersion($appId)));
 					\OC_App::updateApp($appId);
 					$this->emit('\OC\Updater', 'appUpgrade', array($appId, \OC_App::getAppVersion($appId)));
 				}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list