Implement pkg move 18/72618/6 accepted/tizen/common/20160613.144706 accepted/tizen/ivi/20160610.114456 accepted/tizen/mobile/20160610.114403 accepted/tizen/tv/20160610.114424 accepted/tizen/wearable/20160610.114442 submit/tizen/20160610.015635
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 2 Jun 2016 00:36:28 +0000 (09:36 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 9 Jun 2016 06:59:42 +0000 (15:59 +0900)
Related change : app-installers
https://review.tizen.org/gerrit/#/c/72616/

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

index 89df583..710a4d5 100644 (file)
@@ -19,6 +19,7 @@
 #include <common/step/filesystem/step_create_per_user_storage_directories.h>
 #include <common/step/filesystem/step_create_storage_directories.h>
 #include <common/step/filesystem/step_delta_patch.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>
@@ -101,6 +102,9 @@ void TpkInstaller::Prepare() {
     case ci::RequestType::Delta:
       DeltaSteps();
       break;
+    case ci::RequestType::Move:
+      MoveSteps();
+      break;
     case ci::RequestType::Recovery:
       RecoverySteps();
       break;
@@ -274,6 +278,15 @@ void TpkInstaller::DeltaSteps() {
   AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
 }
 
+void TpkInstaller::MoveSteps() {
+  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>();
+}
+
 void TpkInstaller::RecoverySteps() {
   AddStep<ci::configuration::StepConfigure>(pkgmgr_);
   AddStep<ci::recovery::StepOpenRecoveryFile>();
index 44c0545..ff33a60 100644 (file)
@@ -29,6 +29,7 @@ class TpkInstaller : public common_installer::AppInstaller {
   void UninstallSteps();
   void ReinstallSteps();
   void DeltaSteps();
+  void MoveSteps();
   void RecoverySteps();
   void MountInstallSteps();
   void MountUpdateSteps();