From: jongmyeongko Date: Wed, 24 Feb 2016 05:51:38 +0000 (+0900) Subject: modification for seperation of RO/RW location X-Git-Tag: submit/tizen/20160229.005700~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbd75d4334bf87f410341d4681bec179df627489;p=platform%2Fcore%2Fappfw%2Fapp-installers.git modification for seperation of RO/RW location Requires: https://review.tizen.org/gerrit/#/c/60194/ Change-Id: I5aa89822e81c36586d978e25539cc95c7365a772 Signed-off-by: jongmyeongko --- diff --git a/src/common/request.cc b/src/common/request.cc index 1b4a022..7f4107e 100644 --- a/src/common/request.cc +++ b/src/common/request.cc @@ -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 ? diff --git a/src/common/step/step_backup_icons.cc b/src/common/step/step_backup_icons.cc index 5a7cddc..f2b8d1b 100644 --- a/src/common/step/step_backup_icons.cc +++ b/src/common/step/step_backup_icons.cc @@ -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; diff --git a/src/common/step/step_configure.cc b/src/common/step/step_configure.cc index d9a27c7..a91f0d6 100644 --- a/src/common/step/step_configure.cc +++ b/src/common/step/step_configure.cc @@ -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); diff --git a/src/common/step/step_create_icons.cc b/src/common/step/step_create_icons.cc index edf3fb9..57558c0 100644 --- a/src/common/step/step_create_icons.cc +++ b/src/common/step/step_create_icons.cc @@ -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); diff --git a/src/common/step/step_parse_manifest.cc b/src/common/step/step_parse_manifest.cc index 409ff9f..92c4444 100644 --- a/src/common/step/step_parse_manifest.cc +++ b/src/common/step/step_parse_manifest.cc @@ -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); diff --git a/src/common/step/step_recover_application.cc b/src/common/step/step_recover_application.cc index 1f71fd1..d43453b 100644 --- a/src/common/step/step_recover_application.cc +++ b/src/common/step/step_recover_application.cc @@ -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); diff --git a/src/common/step/step_recover_icons.cc b/src/common/step/step_recover_icons.cc index eb9e187..14d4074 100644 --- a/src/common/step/step_recover_icons.cc +++ b/src/common/step/step_recover_icons.cc @@ -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; diff --git a/src/common/step/step_recover_manifest.cc b/src/common/step/step_recover_manifest.cc index 2ff511e..5fbe8c4 100644 --- a/src/common/step/step_recover_manifest.cc +++ b/src/common/step/step_recover_manifest.cc @@ -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); diff --git a/src/common/step/step_remove_icons.cc b/src/common/step/step_remove_icons.cc index f73c206..ae6dae0 100644 --- a/src/common/step/step_remove_icons.cc +++ b/src/common/step/step_remove_icons.cc @@ -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;