Switch parsing procedures to StepParseManifest 50/57750/2 submit/tizen/20160122.140520
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 22 Jan 2016 09:38:45 +0000 (10:38 +0100)
committerLukasz Wysocki <l.wysocki@samsung.com>
Fri, 22 Jan 2016 10:52:27 +0000 (11:52 +0100)
Run smoke tests to verify.

Requires:
 - https://review.tizen.org/gerrit/57749

Change-Id: I1818cafd32f5347418f3f5b298b3cc4bcb62c2fc

src/hybrid/hybrid_installer.cc
src/wgt/wgt_installer.cc

index d044c7e..d2070d5 100644 (file)
@@ -16,8 +16,7 @@
 #include <common/step/step_delta_patch.h>
 #include <common/step/step_fail.h>
 #include <common/step/step_kill_apps.h>
-#include <common/step/step_old_manifest.h>
-#include <common/step/step_parse.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_register_security.h>
@@ -32,7 +31,6 @@
 #include <common/step/step_update_security.h>
 
 #include <tpk/step/step_create_symbolic_link.h>
-#include <tpk/step/step_parse.h>
 #include <tpk/step/step_tpk_patch_icons.h>
 
 #include "hybrid/hybrid_backend_data.h"
@@ -60,7 +58,9 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
     case ci::RequestType::Install:
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::filesystem::StepUnzip>();
-      AddStep<tpk::parse::StepParse>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::PACKAGE,
+          ci::parse::StepParseManifest::StoreLocation::NORMAL);
       AddStep<hybrid::parse::StepStashTpkConfig>();
       AddStep<hybrid::parse::StepParse>(true);
       AddStep<hybrid::parse::StepMergeTpkConfig>();
@@ -85,7 +85,9 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
     case ci::RequestType::Update:
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::filesystem::StepUnzip>();
-      AddStep<tpk::parse::StepParse>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::PACKAGE,
+          ci::parse::StepParseManifest::StoreLocation::NORMAL);
       AddStep<hybrid::parse::StepStashTpkConfig>();
       AddStep<hybrid::parse::StepParse>(true);
       AddStep<hybrid::parse::StepMergeTpkConfig>();
@@ -95,7 +97,9 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
       AddStep<hybrid::encrypt::StepEncryptResources>();
       AddStep<ci::security::StepRollbackInstallationSecurity>();
-      AddStep<ci::backup::StepOldManifest>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::parse::StepParseManifest::StoreLocation::BACKUP);
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::backup::StepBackupIcons>();
@@ -116,7 +120,9 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       // TODO(t.iwanek): this parses both configuration files
       // tpk and wgt, removing pkgmgr-parser should change this code
       // that it will still support parsing both files
-      AddStep<ci::parse::StepParse>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::parse::StepParseManifest::StoreLocation::NORMAL);
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::pkgmgr::StepUnregisterApplication>();
@@ -133,9 +139,11 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
     case ci::RequestType::Delta:
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::filesystem::StepUnzip>();
-      // TODO(t.iwanek): manifest is parsed twice...
-      AddStep<tpk::parse::StepParse>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::PACKAGE,
+          ci::parse::StepParseManifest::StoreLocation::NORMAL);
       AddStep<hybrid::parse::StepStashTpkConfig>();
+      // TODO(t.iwanek): manifest is parsed twice...
       AddStep<hybrid::parse::StepParse>(false);
       AddStep<hybrid::parse::StepMergeTpkConfig>();
       AddStep<ci::filesystem::StepDeltaPatch>();
@@ -146,7 +154,9 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
       AddStep<hybrid::encrypt::StepEncryptResources>();
       AddStep<ci::security::StepRollbackInstallationSecurity>();
-      AddStep<ci::backup::StepOldManifest>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::parse::StepParseManifest::StoreLocation::BACKUP);
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::backup::StepBackupIcons>();
index 3db7e38..ff190c6 100644 (file)
@@ -17,7 +17,7 @@
 #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.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>
@@ -33,7 +33,6 @@
 #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_old_manifest.h>
 #include <common/step/step_check_signature.h>
 #include <common/step/step_unregister_app.h>
 #include <common/step/step_unzip.h>
@@ -100,7 +99,9 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
       AddStep<ci::security::StepCheckOldCertificate>();
       AddStep<wgt::filesystem::StepWgtResourceDirectory>();
-      AddStep<ci::backup::StepOldManifest>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::parse::StepParseManifest::StoreLocation::BACKUP);
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::backup::StepBackupIcons>();
@@ -117,7 +118,9 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
     }
     case ci::RequestType::Uninstall: {
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
-      AddStep<ci::parse::StepParse>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::parse::StepParseManifest::StoreLocation::NORMAL);
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::pkgmgr::StepUnregisterApplication>();
@@ -132,7 +135,9 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<wgt::parse::StepParse>(false);
       AddStep<ci::pkgmgr::StepKillApps>();
-      AddStep<ci::backup::StepOldManifest>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::parse::StepParseManifest::StoreLocation::BACKUP);
       AddStep<wgt::rds::StepRDSParse>();
       AddStep<wgt::rds::StepRDSModify>();
       AddStep<ci::security::StepUpdateSecurity>();
@@ -151,7 +156,9 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
       AddStep<ci::security::StepCheckOldCertificate>();
       AddStep<wgt::filesystem::StepWgtResourceDirectory>();
-      AddStep<ci::backup::StepOldManifest>();
+      AddStep<ci::parse::StepParseManifest>(
+          ci::parse::StepParseManifest::ManifestLocation::INSTALLED,
+          ci::parse::StepParseManifest::StoreLocation::BACKUP);
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::backup::StepBackupIcons>();