Add StepRegisterPluginInfo 24/195924/10
authorJunghyun Yeon <jungh.yeon@samsung.com>
Wed, 19 Dec 2018 12:13:58 +0000 (21:13 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 8 Mar 2019 02:42:01 +0000 (02:42 +0000)
- By adding procedure for storing plugin execution info,
  additional Step for storing it to db is needed.

Related changes:
[pkgmgr-info] : https://review.tizen.org/gerrit/#/c/platform/core/appfw/pkgmgr-info/+/195920/
[app-installers] : https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/195744/

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

index 4fe71cfb7812c2cb3dd6dc5388b0b80c88fa3371..80b7874a6cf0c23b02667f6e6dabeb2a92dcd7f6 100644 (file)
 #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_register_plugin_info.h>
 #include <common/step/pkgmgr/step_remove_manifest.h>
 #include <common/step/pkgmgr/step_run_parser_plugins.h>
 #include <common/step/pkgmgr/step_unregister_app.h>
+#include <common/step/pkgmgr/step_unregister_plugin_info.h>
 #include <common/step/pkgmgr/step_update_app.h>
 #include <common/step/pkgmgr/step_update_pkg_disable_info.h>
+#include <common/step/pkgmgr/step_update_plugin_info.h>
 #include <common/step/rds/step_rds_modify.h>
 #include <common/step/rds/step_rds_parse.h>
 #include <common/step/recovery/step_open_recovery_file.h>
@@ -161,6 +164,7 @@ void TpkInstaller::InstallSteps() {
   AddStep<ci::security::StepRegisterSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(
       ci::Plugin::ActionType::Install);
+  AddStep<ci::pkgmgr::StepRegisterPluginInfo>();
   AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
@@ -210,6 +214,7 @@ void TpkInstaller::UpdateSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
+  AddStep<ci::pkgmgr::StepUpdatePluginInfo>();
   AddStep<ci::filesystem::StepUpdatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
@@ -241,6 +246,7 @@ void TpkInstaller::UninstallSteps() {
   AddStep<ci::pkgmgr::StepRemoveManifest>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(
       ci::Plugin::ActionType::Uninstall);
+  AddStep<ci::pkgmgr::StepUnregisterPluginInfo>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
 }
 
@@ -285,6 +291,7 @@ void TpkInstaller::ReinstallSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
+  AddStep<ci::pkgmgr::StepUpdatePluginInfo>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
 }
@@ -336,6 +343,7 @@ void TpkInstaller::DeltaSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
+  AddStep<ci::pkgmgr::StepUpdatePluginInfo>();
   AddStep<ci::filesystem::StepUpdatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
@@ -416,6 +424,7 @@ void TpkInstaller::MountInstallSteps() {
   AddStep<ci::security::StepRegisterSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(
       ci::Plugin::ActionType::Install);
+  AddStep<ci::pkgmgr::StepRegisterPluginInfo>();
   AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>(true);
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
@@ -464,6 +473,7 @@ void TpkInstaller::MountUpdateSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
+  AddStep<ci::pkgmgr::StepUpdatePluginInfo>();
   AddStep<ci::filesystem::StepUpdatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>(true);
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
@@ -498,6 +508,7 @@ void TpkInstaller::ManifestDirectInstallSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Install);
   AddStep<ci::security::StepRegisterSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Install);
+  AddStep<ci::pkgmgr::StepRegisterPluginInfo>();
   AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
@@ -531,6 +542,7 @@ void TpkInstaller::ManifestDirectUpdateSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepRegisterSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
+  AddStep<ci::pkgmgr::StepUpdatePluginInfo>();
   AddStep<ci::filesystem::StepUpdatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
@@ -554,6 +566,7 @@ void TpkInstaller::ManifestPartialInstallSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Install);
   AddStep<ci::security::StepRegisterSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Install);
+  AddStep<ci::pkgmgr::StepRegisterPluginInfo>();
   AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
 }
@@ -577,6 +590,7 @@ void TpkInstaller::ManifestPartialUpdateSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepRegisterSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
+  AddStep<ci::pkgmgr::StepUpdatePluginInfo>();
   AddStep<ci::filesystem::StepUpdatePerUserStorageDirectories>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
 }
@@ -598,6 +612,7 @@ void TpkInstaller::PartialUninstallSteps() {
   AddStep<ci::security::StepUnregisterTrustAnchor>();
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Uninstall);
+  AddStep<ci::pkgmgr::StepUnregisterPluginInfo>();
   AddStep<ci::security::StepRevokeSecurity>();
 }
 
@@ -640,6 +655,7 @@ void TpkInstaller::ReadonlyUpdateInstallSteps() {
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
+  AddStep<ci::pkgmgr::StepRegisterPluginInfo>();
   AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
   AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
 }
@@ -677,6 +693,7 @@ void TpkInstaller::ReadonlyUpdateUninstallSteps() {
   AddStep<ci::security::StepUpdateSecurity>();
   AddStep<ci::pkgmgr::StepRemoveManifest>();
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
+  AddStep<ci::pkgmgr::StepUpdatePluginInfo>();
 }
 
 void TpkInstaller::DisablePkgSteps() {
@@ -689,6 +706,7 @@ void TpkInstaller::DisablePkgSteps() {
     ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable);
   AddStep<ci::pkgmgr::StepRunParserPlugin>(
     ci::Plugin::ActionType::Uninstall);
+  AddStep<ci::pkgmgr::StepUnregisterPluginInfo>();
 }
 
 void TpkInstaller::EnablePkgSteps() {