Clear memory db before sending the finish signal
[platform/core/appfw/app-installers.git] / src / common / installer / app_installer.cc
index 47f9a29..bdef968 100644 (file)
@@ -207,10 +207,8 @@ 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();
@@ -872,6 +870,8 @@ void AppInstaller::SendProgress(int progress) {
 }
 
 void AppInstaller::SendFinished(Step::Status process_status) {
+  pkgmgr_parser_clear_cache_memory_db();
+
   if (!SendStartIfNotSent(false))
     return;