From: Sangyoon Jang Date: Fri, 5 Jan 2018 07:51:10 +0000 (+0900) Subject: Send error signal properly when installation failed X-Git-Tag: accepted/tizen/unified/20180123.061147~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F19%2F166019%2F2;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Send error signal properly when installation failed 'status' which is result of each step should not be overwritten by undo and clean operation. Change-Id: Ia39713c5f480645536f4e6dfd187bbf05b0905e7 Signed-off-by: Sangyoon Jang --- diff --git a/src/common/app_installer.cc b/src/common/app_installer.cc index 9a3f98f..c670a3a 100644 --- a/src/common/app_installer.cc +++ b/src/common/app_installer.cc @@ -132,8 +132,9 @@ AppInstaller::Result AppInstaller::Run() { if (it != itEnd && ret == Result::ERROR) { LOG(ERROR) << "Failure occurs in step: " << (*it)->name(); do { - status = SafeExecute(*it, &Step::undo, "undo"); - if (Step::Status::OK != status) { + if (SafeExecute(*it, &Step::undo, "undo") != Step::Status::OK) { + LOG(ERROR) << "Error during undo operation(" << (*it)->name() + << "), but continuing..."; ret = Result::UNDO_ERROR; } } while (it-- != itStart); @@ -141,8 +142,8 @@ AppInstaller::Result AppInstaller::Run() { do { if (it == itEnd) --it; - status = SafeExecute(*it, &Step::clean, "clean"); - if (Step::Status::OK != status) { + if (SafeExecute(*it, &Step::clean, "clean") != Step::Status::OK) { + LOG(ERROR) << "Error during clean operation(" << (*it)->name() << ")"; ret = Result::CLEANUP_ERROR; break; }