modification for seperation of RO/RW location 00/60200/4
authorjongmyeongko <jongmyeong.ko@samsung.com>
Wed, 24 Feb 2016 05:51:38 +0000 (14:51 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Fri, 26 Feb 2016 04:23:34 +0000 (20:23 -0800)
Requires:
https://review.tizen.org/gerrit/#/c/60194/

Change-Id: I5aa89822e81c36586d978e25539cc95c7365a772
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/common/request.cc
src/common/step/step_backup_icons.cc
src/common/step/step_configure.cc
src/common/step/step_create_icons.cc
src/common/step/step_parse_manifest.cc
src/common/step/step_recover_application.cc
src/common/step/step_recover_icons.cc
src/common/step/step_recover_manifest.cc
src/common/step/step_remove_icons.cc

index 1b4a022..7f4107e 100644 (file)
@@ -14,6 +14,7 @@ RequestMode GetRequestMode() {
       RequestMode::GLOBAL : RequestMode::USER;
 }
 
+// Now, preload app is always installed RO location.
 const char *GetRootAppPath(bool is_preload) {
   return GetRequestMode() == RequestMode::USER ?
       tzplatform_getenv(TZ_USER_APP) : is_preload ?
index 5a7cddc..f2b8d1b 100644 (file)
@@ -23,7 +23,8 @@ namespace backup {
 
 Step::Status StepBackupIcons::process() {
   // gather icon info
-  for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get()));
+  for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get(),
+          context_->is_preload_request.get()));
       iter != bf::directory_iterator(); ++iter) {
     if (!bf::is_regular_file(iter->path()))
       continue;
index d9a27c7..a91f0d6 100644 (file)
@@ -78,7 +78,9 @@ Step::Status StepConfigure::process() {
       context_->pkgid.set(pkgmgr_->GetRequestInfo());
       bf::path package_directory =
           context_->root_application_path.get() / context_->pkgid.get();
-      bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
+      bf::path xml_path =
+          bf::path(getUserManifestPath(context_->uid.get(),
+              context_->is_preload_request.get()))
           / bf::path(context_->pkgid.get());
       xml_path += ".xml";
       context_->unpacked_dir_path.set(package_directory);
index edf3fb9..57558c0 100644 (file)
@@ -25,7 +25,8 @@ Step::Status StepCreateIcons::undo() {
 }
 
 Step::Status StepCreateIcons::process() {
-  bf::path destination = getIconPath(context_->uid.get());
+  bf::path destination =
+      getIconPath(context_->uid.get(), context_->is_preload_request.get());
   bs::error_code error;
   if (!bf::exists(destination)) {
     bf::create_directories(destination, error);
index 409ff9f..92c4444 100644 (file)
@@ -93,7 +93,9 @@ bool StepParseManifest::LocateConfigFile() {
       break;
     }
     case ManifestLocation::INSTALLED: {
-      bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
+      bf::path xml_path =
+          bf::path(getUserManifestPath(context_->uid.get(),
+              context_->is_preload_request.get()))
           / bf::path(context_->pkgid.get());
       xml_path += ".xml";
       context_->xml_path.set(xml_path);
index 1f71fd1..d43453b 100644 (file)
@@ -52,7 +52,9 @@ Step::Status StepRecoverApplication::RecoveryUpdate() {
 bool StepRecoverApplication::SetXmlPaths() {
   if (context_->pkgid.get().empty())
     return false;
-  bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
+  bf::path xml_path =
+      bf::path(getUserManifestPath(context_->uid.get(),
+          context_->is_preload_request.get()))
       / context_->pkgid.get();
   xml_path += ".xml";
   context_->xml_path.set(xml_path);
index eb9e187..14d4074 100644 (file)
@@ -56,7 +56,8 @@ bool StepRecoverIcons::TryGatherIcons() {
     return false;
 
   // gather icon info
-  for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get()));
+  for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get(),
+          context_->is_preload_request.get()));
       iter != bf::directory_iterator(); ++iter) {
     if (!bf::is_regular_file(iter->path()))
       continue;
index 2ff511e..5fbe8c4 100644 (file)
@@ -54,7 +54,9 @@ Step::Status StepRecoverManifest::RecoveryUpdate() {
 bool StepRecoverManifest::SetXmlPaths() {
   if (context_->pkgid.get().empty())
     return false;
-  bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
+  bf::path xml_path =
+      bf::path(getUserManifestPath(context_->uid.get(),
+          context_->is_preload_request.get()))
       / context_->pkgid.get();
   xml_path += ".xml";
   context_->xml_path.set(xml_path);
index f73c206..ae6dae0 100644 (file)
@@ -30,7 +30,8 @@ Step::Status StepRemoveIcons::precheck() {
 }
 
 Step::Status StepRemoveIcons::process() {
-  for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get()));
+  for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get(),
+          context_->is_preload_request.get()));
       iter != bf::directory_iterator(); ++iter) {
     if (!bf::is_regular_file(iter->path()))
       continue;