{tzplatform_getenv(TZ_SYS_HOME), SM_APP_INSTALL_LOCAL},
{tzplatform_getenv(TZ_SYS_RW_APP), SM_APP_INSTALL_GLOBAL},
{tzplatform_getenv(TZ_SYS_RO_APP), SM_APP_INSTALL_PRELOADED},
- {tzplatform_mkpath(TZ_SYS_RO_ETC, "skel"), SM_APP_INSTALL_PRELOADED},
+ {tzplatform_mkpath(TZ_SYS_ETC, "skel"), SM_APP_INSTALL_PRELOADED},
};
bool PrepareRequest(const std::string& app_id, const std::string& pkg_id,
const char kSharedResDir[] = "shared/res";
const char kSharedDataDir[] = "shared/data";
const char kSharedTrustedDir[] = "shared/trusted";
-const char kSkelAppDir[] = "/etc/skel/apps_rw";
+const char kSkelAppDir[] = "skel/apps_rw";
const char kExternalStoragePrivilege[] =
"http://tizen.org/privilege/externalstorage.appdata";
const char kSystemShareGroupName[] = "system_share";
const std::string& api_version,
bool trusted, bool shareddata, bool is_readonly,
const std::vector<const char*> additional_dirs) {
- bf::path path = bf::path(kSkelAppDir) / pkgid;
+ bf::path path = bf::path(tzplatform_getenv(TZ_SYS_ETC)) /
+ bf::path(kSkelAppDir) / pkgid;
LOG(DEBUG) << "Creating directories in: " << path;
utils::VersionNumber api_ver(api_version);
bool DeleteSkelDirectories(const std::string& pkgid) {
- return DeleteDirectories(bf::path(kSkelAppDir), pkgid);
+ bf::path path = bf::path(tzplatform_getenv(TZ_SYS_ETC)) /
+ bf::path(kSkelAppDir);
+ return DeleteDirectories(path, pkgid);
}
uid_t uid = std::get<0>(l);
LOG(DEBUG) << "Copying directories for uid: " << uid;
bf::path apps_rw(std::get<2>(l) / "apps_rw");
- bf::path src = bf::path(kSkelAppDir) / pkgid;
+ bf::path src = bf::path(tzplatform_getenv(TZ_SYS_ETC)) /
+ bf::path(kSkelAppDir) / pkgid;
bf::path dst = apps_rw / pkgid;
if (!ci::CopyDir(src, dst, FSFlag::FS_NONE, true))
continue;
break;
}
}
- // Now, /etc/skel is RO mounted region, so we should skip the creation.
- if (!context_->partial_rw.get()) {
- if (!common_installer::CreateSkelDirectories(package_id,
- str_ver, trusted, shareddata, context_->is_readonly_package.get(),
- additional_shared_dirs_)) {
- LOG(ERROR) << "Failed to create skel dirs";
- return Status::APP_DIR_ERROR;
- }
+ if (!common_installer::CreateSkelDirectories(package_id,
+ str_ver, trusted, shareddata, context_->is_readonly_package.get())) {
+ LOG(ERROR) << "Failed to create skel dirs";
+ return Status::APP_DIR_ERROR;
}
if (!CopyUserDirectories(package_id)) {