Implement move request for wgt-backend 39/74039/3
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 10 Jun 2016 10:58:58 +0000 (12:58 +0200)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Mon, 20 Jun 2016 05:57:15 +0000 (22:57 -0700)
Check success of commands to verify:
  wgt-backend -i ${package}
  wgt-backend -m ${pkgid} -t 1
  wgt-backend -m ${pkgid} -t 2

Change-Id: I72ef419c1b4c5f99b3477265a7549a53c5efa838

src/wgt/step/configuration/step_parse.cc
src/wgt/wgt_installer.cc

index ee937d2..51c86ca 100644 (file)
@@ -200,6 +200,7 @@ bool StepParse::FillWidgetInfo(manifest_x* manifest) {
   manifest->appsetting = strdup("false");
   manifest->nodisplay_setting = strdup("false");
   manifest->preload = strdup("false");
+  manifest->installed_storage = strdup("installed_internal");
 
   // For wgt package use the long name
   for (auto& item : wgt_info->name_set()) {
index 11b7c9b..bfa2b4e 100644 (file)
@@ -23,6 +23,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>
@@ -377,6 +378,16 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       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;
+    }
     default: {
       AddStep<ci::configuration::StepFail>();
     }