From: Junghyun Yeon Date: Fri, 26 Mar 2021 08:57:18 +0000 (+0900) Subject: Add function call to clear memory db X-Git-Tag: accepted/tizen/unified/20210328.230632~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=537051d036668a86d763a563aadf69ee105cd99b;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Add function call to clear memory db Change-Id: I9f73721835195241053cd32a1c39696b77b5e2ac Signed-off-by: Junghyun Yeon --- diff --git a/src/common/installer/app_installer.cc b/src/common/installer/app_installer.cc index a2c31bd..caed2af 100644 --- a/src/common/installer/app_installer.cc +++ b/src/common/installer/app_installer.cc @@ -9,6 +9,8 @@ #include #include +#include + #include "common/installer/app_installer.h" #include "common/installer_context.h" #include "common/pkgmgr_interface.h" @@ -202,8 +204,10 @@ AppInstaller::Result AppInstaller::Run() { Process(); if (it_ != steps_.end() && result_ == Result::ERROR) { LOG(ERROR) << "Failure occurs in step: " << (*it_)->name(); + pkgmgr_parser_clear_cache_memory_db(); Undo(); } else { + pkgmgr_parser_clear_cache_memory_db(); Clean(); } sync(); diff --git a/src/common/installer_runner.cc b/src/common/installer_runner.cc index a5f8646..c98432f 100644 --- a/src/common/installer_runner.cc +++ b/src/common/installer_runner.cc @@ -85,12 +85,12 @@ AppInstaller::Result InstallerRunner::Run() { break; } if (it != installers_.end() && result == AppInstaller::Result::ERROR) { + pkgmgr_parser_clear_cache_memory_db(); do { AppInstaller::Result ret = (*it)->Undo(); if (ret != AppInstaller::Result::OK && ret != AppInstaller::Result::ERROR) result = AppInstaller::Result::UNDO_ERROR; } while (it-- != installers_.begin()); - pkgmgr_parser_clear_cache_memory_db(); } else { pkgmgr_parser_clear_cache_memory_db(); if (pkgmgr_->GetRequestType() != RequestType::Recovery)