Supplement ParserPlugin 63/179063/4
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 15 May 2018 11:22:50 +0000 (20:22 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 25 May 2018 08:29:38 +0000 (17:29 +0900)
- Adjust order of steps.
- Add StepRecoverParserPlugin.

Related changes:
[app-installers] : https://review.tizen.org/gerrit/178962

Change-Id: I7bddab2ef30a9c6f4adc252bb41270f7559c2f86
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/tpk/tpk_installer.cc

index 427c2f1..d7f0aed 100644 (file)
@@ -60,6 +60,7 @@
 #include <common/step/pkgmgr/step_check_restriction.h>
 #include <common/step/pkgmgr/step_kill_apps.h>
 #include <common/step/pkgmgr/step_recover_application.h>
+#include <common/step/pkgmgr/step_recover_parser_plugins.h>
 #include <common/step/pkgmgr/step_register_app.h>
 #include <common/step/pkgmgr/step_remove_manifest.h>
 #include <common/step/pkgmgr/step_run_parser_plugins.h>
@@ -221,8 +222,6 @@ void TpkInstaller::UninstallSteps() {
       ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
       ci::configuration::StepParseManifest::StoreLocation::NORMAL);
   AddStep<ci::configuration::StepCheckInstallLocation>();
-  AddStep<ci::pkgmgr::StepRunParserPlugin>(
-      ci::Plugin::ActionType::Uninstall);
   AddStep<ci::pkgmgr::StepKillApps>();
   AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
   AddStep<ci::filesystem::StepOptionalAcquireExternalStorage>();
@@ -238,6 +237,8 @@ void TpkInstaller::UninstallSteps() {
   AddStep<ci::filesystem::StepRemoveIcons>();
   AddStep<ci::security::StepRevokeSecurity>();
   AddStep<ci::pkgmgr::StepRemoveManifest>();
+  AddStep<ci::pkgmgr::StepRunParserPlugin>(
+      ci::Plugin::ActionType::Uninstall);
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
 }
 
@@ -358,6 +359,7 @@ void TpkInstaller::RecoverySteps() {
       ci::configuration::StepParseManifest::StoreLocation::NORMAL);
   AddStep<ci::filesystem::StepRemoveTemporaryDirectory>();
   AddStep<ci::filesystem::StepRecoverIcons>();
+  AddStep<ci::pkgmgr::StepRecoverParserPlugin>();
   AddStep<ci::filesystem::StepRecoverManifest>();
   AddStep<ci::filesystem::StepRecoverExternalStorage>();
   AddStep<ci::filesystem::StepRecoverStorageDirectories>();
@@ -656,7 +658,6 @@ void TpkInstaller::ReadonlyUpdateUninstallSteps() {
   AddStep<ci::security::StepPrivilegeCompatibility>(
       ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
   AddStep<ci::configuration::StepSwitchReadonlyMode>();
-  AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
   AddStep<ci::pkgmgr::StepKillApps>();
   AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
   AddStep<tpk::filesystem::StepRemoveExternalStorageDirectories>();
@@ -674,6 +675,7 @@ void TpkInstaller::ReadonlyUpdateUninstallSteps() {
   AddStep<ci::configuration::StepSwitchReadonlyMode>();
   AddStep<ci::security::StepUpdateSecurity>();
   AddStep<ci::pkgmgr::StepRemoveManifest>();
+  AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
 }
 
 void TpkInstaller::DisablePkgSteps() {