Adjust to change in StepAcquireExternalStorage
[platform/core/appfw/wgt-backend.git] / src / wgt / wgt_installer.cc
old mode 100644 (file)
new mode 100755 (executable)
index 4eec68c..01f2440
@@ -5,59 +5,90 @@
 #include "wgt/wgt_installer.h"
 
 #include <common/pkgmgr_interface.h>
-#include <common/step/step_configure.h>
-#include <common/step/step_backup_icons.h>
-#include <common/step/step_backup_manifest.h>
-#include <common/step/step_check_blacklist.h>
-#include <common/step/step_create_icons.h>
-#include <common/step/step_create_storage_directories.h>
-#include <common/step/step_clear_data.h>
-#include <common/step/step_copy.h>
-#include <common/step/step_copy_backup.h>
-#include <common/step/step_copy_storage_directories.h>
-#include <common/step/step_delta_patch.h>
-#include <common/step/step_fail.h>
-#include <common/step/step_kill_apps.h>
-#include <common/step/step_open_recovery_file.h>
-#include <common/step/step_parse_manifest.h>
-#include <common/step/step_privilege_compatibility.h>
-#include <common/step/step_register_app.h>
-#include <common/step/step_recover_application.h>
-#include <common/step/step_recover_files.h>
-#include <common/step/step_recover_icons.h>
-#include <common/step/step_recover_manifest.h>
-#include <common/step/step_recover_security.h>
-#include <common/step/step_recover_storage_directories.h>
-#include <common/step/step_remove_icons.h>
-#include <common/step/step_remove_files.h>
-#include <common/step/step_remove_temporary_directory.h>
-#include <common/step/step_revoke_security.h>
-#include <common/step/step_register_security.h>
-#include <common/step/step_rollback_deinstallation_security.h>
-#include <common/step/step_rollback_installation_security.h>
-#include <common/step/step_check_signature.h>
-#include <common/step/step_unregister_app.h>
-#include <common/step/step_unzip.h>
-#include <common/step/step_update_app.h>
-#include <common/step/step_update_security.h>
-#include <common/step/step_check_old_certificate.h>
-#include <common/step/step_remove_manifest.h>
+
+#include <common/step/backup/step_backup_icons.h>
+#include <common/step/backup/step_backup_manifest.h>
+#include <common/step/backup/step_copy_backup.h>
+#include <common/step/configuration/step_block_cross_update.h>
+#include <common/step/configuration/step_check_tizen_version.h>
+#include <common/step/configuration/step_configure.h>
+#include <common/step/configuration/step_fail.h>
+#include <common/step/configuration/step_parse_manifest.h>
+#include <common/step/configuration/step_parse_preload.h>
+#include <common/step/filesystem/step_acquire_external_storage.h>
+#include <common/step/filesystem/step_clear_data.h>
+#include <common/step/filesystem/step_copy.h>
+#include <common/step/filesystem/step_copy_storage_directories.h>
+#include <common/step/filesystem/step_copy_tep.h>
+#include <common/step/filesystem/step_create_icons.h>
+#include <common/step/filesystem/step_create_per_user_storage_directories.h>
+#include <common/step/filesystem/step_create_legacy_directories.h>
+#include <common/step/filesystem/step_create_storage_directories.h>
+#include <common/step/filesystem/step_delta_patch.h>
+#include <common/step/filesystem/step_disable_external_mount.h>
+#include <common/step/filesystem/step_enable_external_mount.h>
+#include <common/step/filesystem/step_move_installed_storage.h>
+#include <common/step/filesystem/step_recover_files.h>
+#include <common/step/filesystem/step_recover_icons.h>
+#include <common/step/filesystem/step_recover_manifest.h>
+#include <common/step/filesystem/step_recover_external_storage.h>
+#include <common/step/filesystem/step_recover_storage_directories.h>
+#include <common/step/filesystem/step_remove_files.h>
+#include <common/step/filesystem/step_remove_icons.h>
+#include <common/step/filesystem/step_remove_per_user_storage_directories.h>
+#include <common/step/filesystem/step_remove_legacy_directories.h>
+#include <common/step/filesystem/step_remove_temporary_directory.h>
+#include <common/step/filesystem/step_remove_tep.h>
+#include <common/step/filesystem/step_remove_zip_image.h>
+#include <common/step/filesystem/step_unzip.h>
+#include <common/step/filesystem/step_update_tep.h>
+#include <common/step/mount/step_mount_install.h>
+#include <common/step/mount/step_mount_unpacked.h>
+#include <common/step/mount/step_mount_update.h>
+#include <common/step/pkgmgr/step_check_removable.h>
+#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_register_app.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_update_app.h>
+#include <common/step/pkgmgr/step_update_pkg_disable_info.h>
+#include <common/step/recovery/step_open_recovery_file.h>
+#include <common/step/security/step_check_old_certificate.h>
+#include <common/step/security/step_check_signature.h>
+#include <common/step/security/step_privilege_compatibility.h>
+#include <common/step/security/step_recover_security.h>
+#include <common/step/security/step_register_security.h>
+#include <common/step/security/step_revoke_security.h>
+#include <common/step/security/step_rollback_deinstallation_security.h>
+#include <common/step/security/step_rollback_installation_security.h>
+#include <common/step/security/step_update_security.h>
 
 #include <wgt_manifest_handlers/widget_config_parser.h>
-#include "wgt/step/step_add_default_privileges.h"
-#include "wgt/step/step_check_settings_level.h"
-#include "wgt/step/step_check_wgt_background_category.h"
-#include "wgt/step/step_create_symbolic_link.h"
-#include "wgt/step/step_encrypt_resources.h"
-#include "wgt/step/step_generate_xml.h"
-#include "wgt/step/step_parse.h"
-#include "wgt/step/step_parse_recovery.h"
-#include "wgt/step/step_rds_modify.h"
-#include "wgt/step/step_rds_parse.h"
-#include "wgt/step/step_remove_encryption_data.h"
-#include "wgt/step/step_wgt_patch_icons.h"
-#include "wgt/step/step_wgt_patch_storage_directories.h"
-#include "wgt/step/step_wgt_resource_directory.h"
+#include <common/step/rds/step_rds_modify.h>
+#include <common/step/rds/step_rds_parse.h>
+
+#include "wgt/step/configuration/step_parse.h"
+#include "wgt/step/encryption/step_encrypt_resources.h"
+#include "wgt/step/encryption/step_remove_encryption_data.h"
+#include "wgt/step/filesystem/step_copy_preview_icons.h"
+#include "wgt/step/filesystem/step_create_symbolic_link.h"
+#include "wgt/step/filesystem/step_wgt_patch_icons.h"
+#include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
+#include "wgt/step/filesystem/step_wgt_prepare_package_directory.h"
+#include "wgt/step/filesystem/step_wgt_resource_directory.h"
+#include "wgt/step/filesystem/step_wgt_update_package_directory.h"
+#include "wgt/step/pkgmgr/step_generate_xml.h"
+#include "wgt/step/rds/step_wgt_rds_modify.h"
+#include "wgt/step/security/step_add_default_privileges.h"
+#include "wgt/step/security/step_check_settings_level.h"
+#include "wgt/step/security/step_check_wgt_background_category.h"
+#include "wgt/step/security/step_check_wgt_notification_category.h"
+#include "wgt/step/security/step_check_wgt_ime_privilege.h"
+#include "wgt/step/security/step_direct_manifest_check_signature.h"
+#include "wgt/step/security/step_check_extension_privileges.h"
 
 namespace ci = common_installer;
 
@@ -72,79 +103,118 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
     case ci::RequestType::Install : {
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::filesystem::StepUnzip>();
-      AddStep<wgt::parse::StepParse>(true);
-      AddStep<ci::blacklist::StepCheckBlacklist>();
+      AddStep<wgt::configuration::StepParse>(
+        wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
+      AddStep<ci::configuration::StepParsePreload>();
+      AddStep<ci::pkgmgr::StepCheckRestriction>();
+      AddStep<ci::configuration::StepCheckTizenVersion>();
       AddStep<ci::security::StepCheckSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>();
       AddStep<wgt::security::StepCheckSettingsLevel>();
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
-      AddStep<wgt::encrypt::StepEncryptResources>();
+      AddStep<wgt::security::StepCheckWgtNotificationCategory>();
+      AddStep<wgt::security::StepCheckWgtImePrivilege>();
+      AddStep<wgt::encryption::StepEncryptResources>();
       AddStep<wgt::filesystem::StepWgtResourceDirectory>();
       AddStep<ci::security::StepRollbackInstallationSecurity>();
+      AddStep<ci::filesystem::StepAcquireExternalStorage>(false);
       AddStep<ci::filesystem::StepCopy>();
+      AddStep<ci::filesystem::StepCopyTep>();
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
       AddStep<ci::filesystem::StepCreateStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
       AddStep<wgt::filesystem::StepWgtPatchIcons>();
       AddStep<ci::filesystem::StepCreateIcons>();
+      AddStep<wgt::filesystem::StepCopyPreviewIcons>();
+      AddStep<wgt::security::StepCheckExtensionPrivileges>();
       AddStep<wgt::pkgmgr::StepGenerateXml>();
       AddStep<ci::pkgmgr::StepRegisterApplication>();
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+          ci::Plugin::ActionType::Install);
       AddStep<ci::security::StepRegisterSecurity>();
+      AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
+      AddStep<ci::filesystem::StepCreateLegacyDirectories>();
       break;
     }
     case ci::RequestType::Update: {
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::filesystem::StepUnzip>();
-      AddStep<wgt::parse::StepParse>(true);
-      AddStep<ci::blacklist::StepCheckBlacklist>();
+      AddStep<wgt::configuration::StepParse>(
+          wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
+      AddStep<ci::configuration::StepParsePreload>();
+      AddStep<ci::configuration::StepCheckTizenVersion>();
       AddStep<ci::security::StepCheckSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>();
       AddStep<wgt::security::StepCheckSettingsLevel>();
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
+      AddStep<wgt::security::StepCheckWgtNotificationCategory>();
+      AddStep<wgt::security::StepCheckWgtImePrivilege>();
       AddStep<ci::security::StepCheckOldCertificate>();
+      AddStep<wgt::encryption::StepEncryptResources>();
       AddStep<wgt::filesystem::StepWgtResourceDirectory>();
-      AddStep<ci::parse::StepParseManifest>(
-          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
-          ci::parse::StepParseManifest::StoreLocation::BACKUP);
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::BACKUP);
+      AddStep<ci::configuration::StepBlockCrossUpdate>();
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::backup::StepBackupIcons>();
+      AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
       AddStep<ci::backup::StepCopyBackup>();
+      AddStep<ci::filesystem::StepUpdateTep>();
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
       AddStep<wgt::filesystem::StepWgtPatchIcons>();
       AddStep<ci::filesystem::StepCreateIcons>();
+      AddStep<wgt::filesystem::StepCopyPreviewIcons>();
       AddStep<ci::filesystem::StepCopyStorageDirectories>();
+      AddStep<wgt::security::StepCheckExtensionPrivileges>();
       AddStep<ci::security::StepUpdateSecurity>();
       AddStep<wgt::pkgmgr::StepGenerateXml>();
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+          ci::Plugin::ActionType::Upgrade);
       AddStep<ci::pkgmgr::StepUpdateApplication>();
       break;
     }
     case ci::RequestType::Uninstall: {
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
-      AddStep<ci::parse::StepParseManifest>(
-          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
-          ci::parse::StepParseManifest::StoreLocation::NORMAL);
+      AddStep<ci::pkgmgr::StepCheckRestriction>();
+      AddStep<ci::pkgmgr::StepCheckRemovable>();
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::NORMAL);
       AddStep<ci::pkgmgr::StepKillApps>();
+      AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+          ci::Plugin::ActionType::Uninstall);
+      AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>();
       AddStep<ci::pkgmgr::StepUnregisterApplication>();
       AddStep<ci::security::StepRollbackDeinstallationSecurity>();
+      AddStep<ci::filesystem::StepRemoveTep>();
       AddStep<ci::filesystem::StepRemoveFiles>();
+      AddStep<ci::filesystem::StepRemoveLegacyDirectories>();
+      AddStep<ci::filesystem::StepRemoveZipImage>();
       AddStep<ci::filesystem::StepRemoveIcons>();
-      AddStep<wgt::encrypt::StepRemoveEncryptionData>();
+      AddStep<wgt::encryption::StepRemoveEncryptionData>();
       AddStep<ci::security::StepRevokeSecurity>();
       AddStep<ci::pkgmgr::StepRemoveManifest>();
       break;
     }
     case ci::RequestType::Reinstall: {
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
-      AddStep<wgt::parse::StepParse>(false);
+      AddStep<wgt::configuration::StepParse>(
+          wgt::configuration::StepParse::ConfigLocation::PACKAGE, false);
+      AddStep<ci::pkgmgr::StepCheckRestriction>();
+      AddStep<ci::configuration::StepCheckTizenVersion>();
       AddStep<ci::pkgmgr::StepKillApps>();
-      AddStep<ci::parse::StepParseManifest>(
-          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
-          ci::parse::StepParseManifest::StoreLocation::BACKUP);
-      AddStep<ci::blacklist::StepCheckBlacklist>();
-      AddStep<wgt::rds::StepRDSParse>();
-      AddStep<wgt::rds::StepRDSModify>();
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::BACKUP);
+      AddStep<ci::configuration::StepBlockCrossUpdate>();
+      AddStep<ci::rds::StepRDSParse>();
+      AddStep<ci::filesystem::StepUpdateTep>();
+      AddStep<wgt::rds::StepWgtRDSModify>();
+      AddStep<wgt::security::StepCheckExtensionPrivileges>();
       AddStep<ci::security::StepUpdateSecurity>();
       break;
     }
@@ -152,41 +222,59 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::filesystem::StepUnzip>();
       // TODO(t.iwanek): manifest is parsed twice...
-      AddStep<wgt::parse::StepParse>(false);  // start file may not have changed
+      AddStep<wgt::configuration::StepParse>(
+            wgt::configuration::StepParse::ConfigLocation::PACKAGE, false);
+      // start file may not have changed
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::BACKUP);
+      AddStep<ci::configuration::StepCheckTizenVersion>();
+      AddStep<ci::filesystem::StepEnableExternalMount>();
       AddStep<ci::filesystem::StepDeltaPatch>("res/wgt/");
-      AddStep<wgt::parse::StepParse>(true);
-      AddStep<ci::blacklist::StepCheckBlacklist>();
+      AddStep<ci::filesystem::StepDisableExternalMount>();
+      AddStep<wgt::configuration::StepParse>(
+          wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
       AddStep<ci::security::StepCheckSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>();
       AddStep<wgt::security::StepCheckSettingsLevel>();
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
+      AddStep<wgt::security::StepCheckWgtNotificationCategory>();
+      AddStep<wgt::security::StepCheckWgtImePrivilege>();
       AddStep<ci::security::StepCheckOldCertificate>();
+      AddStep<wgt::encryption::StepEncryptResources>();
       AddStep<wgt::filesystem::StepWgtResourceDirectory>();
-      AddStep<ci::parse::StepParseManifest>(
-          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
-          ci::parse::StepParseManifest::StoreLocation::BACKUP);
+      AddStep<ci::configuration::StepBlockCrossUpdate>();
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::backup::StepBackupIcons>();
+      AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
       AddStep<ci::backup::StepCopyBackup>();
+      AddStep<ci::filesystem::StepUpdateTep>();
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
       AddStep<wgt::filesystem::StepWgtPatchIcons>();
       AddStep<ci::filesystem::StepCreateIcons>();
+      AddStep<wgt::filesystem::StepCopyPreviewIcons>();
       AddStep<ci::filesystem::StepCopyStorageDirectories>();
+      AddStep<wgt::security::StepCheckExtensionPrivileges>();
       AddStep<ci::security::StepUpdateSecurity>();
       AddStep<wgt::pkgmgr::StepGenerateXml>();
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+          ci::Plugin::ActionType::Upgrade);
       AddStep<ci::pkgmgr::StepUpdateApplication>();
       break;
     }
     case ci::RequestType::Recovery: {
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::recovery::StepOpenRecoveryFile>();
-      AddStep<wgt::parse::StepParseRecovery>();
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::RECOVERY,
+          ci::configuration::StepParseManifest::StoreLocation::NORMAL);
       AddStep<ci::pkgmgr::StepRecoverApplication>();
       AddStep<ci::filesystem::StepRemoveTemporaryDirectory>();
       AddStep<ci::filesystem::StepRecoverIcons>();
       AddStep<ci::filesystem::StepRecoverManifest>();
+      AddStep<ci::filesystem::StepRecoverExternalStorage>();
       AddStep<ci::filesystem::StepRecoverStorageDirectories>();
       AddStep<ci::filesystem::StepRecoverFiles>();
       AddStep<ci::security::StepRecoverSecurity>();
@@ -194,9 +282,161 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
     }
     case ci::RequestType::Clear: {
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::NORMAL);
       AddStep<ci::filesystem::StepClearData>();
       break;
     }
+    case ci::RequestType::MountInstall: {
+      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
+      AddStep<ci::mount::StepMountUnpacked>();
+      AddStep<wgt::configuration::StepParse>(
+          wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
+      AddStep<ci::configuration::StepParsePreload>();
+      AddStep<ci::pkgmgr::StepCheckRestriction>();
+      AddStep<ci::configuration::StepCheckTizenVersion>();
+      AddStep<ci::security::StepCheckSignature>();
+      AddStep<ci::security::StepPrivilegeCompatibility>();
+      AddStep<wgt::security::StepCheckSettingsLevel>();
+      AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
+      AddStep<wgt::security::StepCheckWgtNotificationCategory>();
+      AddStep<wgt::security::StepCheckWgtImePrivilege>();
+      AddStep<wgt::encryption::StepEncryptResources>();
+      AddStep<ci::security::StepRollbackInstallationSecurity>();
+      AddStep<ci::mount::StepMountInstall>();
+      AddStep<wgt::filesystem::StepWgtPreparePackageDirectory>();
+      AddStep<ci::filesystem::StepCopyTep>();
+      AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
+      AddStep<ci::filesystem::StepCreateStorageDirectories>();
+      AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
+      AddStep<ci::filesystem::StepCreateIcons>();
+      AddStep<wgt::filesystem::StepCopyPreviewIcons>();
+      AddStep<wgt::pkgmgr::StepGenerateXml>();
+      AddStep<ci::pkgmgr::StepRegisterApplication>();
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+          ci::Plugin::ActionType::Install);
+      AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
+      AddStep<wgt::security::StepCheckExtensionPrivileges>();
+      AddStep<ci::security::StepRegisterSecurity>();
+      AddStep<ci::filesystem::StepCreateLegacyDirectories>();
+      break;
+    }
+    case ci::RequestType::MountUpdate: {
+      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
+      AddStep<ci::mount::StepMountUnpacked>();
+      AddStep<wgt::configuration::StepParse>(
+          wgt::configuration::StepParse::ConfigLocation::PACKAGE, true);
+      AddStep<ci::configuration::StepParsePreload>();
+      AddStep<ci::configuration::StepCheckTizenVersion>();
+      AddStep<ci::security::StepCheckSignature>();
+      AddStep<ci::security::StepPrivilegeCompatibility>();
+      AddStep<wgt::security::StepCheckSettingsLevel>();
+      AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
+      AddStep<wgt::security::StepCheckWgtNotificationCategory>();
+      AddStep<wgt::security::StepCheckWgtImePrivilege>();
+      AddStep<ci::security::StepCheckOldCertificate>();
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::BACKUP);
+      AddStep<ci::configuration::StepBlockCrossUpdate>();
+      AddStep<ci::pkgmgr::StepKillApps>();
+      AddStep<ci::backup::StepBackupManifest>();
+      AddStep<ci::backup::StepBackupIcons>();
+      AddStep<ci::mount::StepMountUpdate>();
+      AddStep<wgt::filesystem::StepWgtUpdatePackageDirectory>();
+      AddStep<ci::filesystem::StepUpdateTep>();
+      AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
+      AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
+      AddStep<ci::filesystem::StepCreateIcons>();
+      AddStep<wgt::filesystem::StepCopyPreviewIcons>();
+      AddStep<wgt::security::StepCheckExtensionPrivileges>();
+      AddStep<ci::security::StepUpdateSecurity>();
+      AddStep<wgt::pkgmgr::StepGenerateXml>();
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+          ci::Plugin::ActionType::Upgrade);
+      AddStep<ci::pkgmgr::StepUpdateApplication>();
+      break;
+    }
+    case ci::RequestType::ManifestDirectInstall: {
+      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
+      AddStep<wgt::configuration::StepParse>(
+          wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
+      AddStep<ci::configuration::StepParsePreload>();
+      AddStep<ci::configuration::StepCheckTizenVersion>();
+      AddStep<wgt::security::StepDirectManifestCheckSignature>();
+      AddStep<ci::security::StepPrivilegeCompatibility>();
+      AddStep<wgt::security::StepCheckWgtNotificationCategory>();
+      AddStep<wgt::security::StepCheckWgtImePrivilege>();
+      AddStep<wgt::security::StepCheckSettingsLevel>();
+      AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
+      AddStep<ci::security::StepRollbackInstallationSecurity>();
+      AddStep<wgt::pkgmgr::StepGenerateXml>();
+      AddStep<ci::pkgmgr::StepRegisterApplication>();
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Install);
+      AddStep<ci::security::StepRegisterSecurity>();
+      break;
+    }
+    case ci::RequestType::ManifestDirectUpdate: {
+      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
+      AddStep<wgt::configuration::StepParse>(
+          wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
+      AddStep<ci::configuration::StepParsePreload>();
+      AddStep<ci::configuration::StepCheckTizenVersion>();
+      AddStep<wgt::security::StepDirectManifestCheckSignature>();
+      AddStep<ci::security::StepPrivilegeCompatibility>();
+      AddStep<wgt::security::StepCheckWgtNotificationCategory>();
+      AddStep<wgt::security::StepCheckWgtImePrivilege>();
+      AddStep<wgt::security::StepCheckSettingsLevel>();
+      AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::BACKUP);
+      AddStep<ci::pkgmgr::StepKillApps>();
+      AddStep<ci::filesystem::StepCopyTep>();
+      AddStep<ci::security::StepUpdateSecurity>();
+      AddStep<wgt::pkgmgr::StepGenerateXml>();
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+          ci::Plugin::ActionType::Upgrade);
+      AddStep<ci::pkgmgr::StepUpdateApplication>();
+      break;
+    }
+    case ci::RequestType::Move: {
+      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::NORMAL);
+      AddStep<ci::pkgmgr::StepKillApps>();
+      AddStep<ci::filesystem::StepMoveInstalledStorage>();
+      AddStep<ci::security::StepRegisterSecurity>();
+      break;
+    }
+    case ci::RequestType::EnablePkg: {
+      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::NORMAL);
+      AddStep<ci::pkgmgr::StepKillApps>();
+      AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
+        ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Enable);
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+        ci::Plugin::ActionType::Uninstall);
+      break;
+    }
+    case ci::RequestType::DisablePkg: {
+      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
+      AddStep<ci::configuration::StepParseManifest>(
+          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::configuration::StepParseManifest::StoreLocation::NORMAL);
+      AddStep<ci::pkgmgr::StepKillApps>();
+      AddStep<ci::pkgmgr::StepUpdatePkgDisableInfo>(
+        ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable);
+      AddStep<ci::pkgmgr::StepRunParserPlugin>(
+        ci::Plugin::ActionType::Uninstall);
+      break;
+    }
     default: {
       AddStep<ci::configuration::StepFail>();
     }