// This function checks for alternative locations of icon file of tpk package
bf::path LocateIcon(const bf::path& filename, const std::string& pkgid,
- const bf::path& root_path, uid_t uid, bool is_preload) {
+ const bf::path& root_path, uid_t uid, bool is_readonly) {
std::vector<bf::path> locations;
- // FIXME: icons for preloaded apps should also be moved to "shared/res"
- const char* extra_icon_path = getIconPath(uid, is_preload);
+ // FIXME: icons for readonly apps should also be moved to "shared/res"
+ const char* extra_icon_path = getIconPath(uid, is_readonly);
if (extra_icon_path) {
bf::path system_location = bf::path(extra_icon_path) / filename;
bf::path small_system_location =
context_->pkgid.get(),
context_->root_application_path.get(),
context_->uid.get(),
- context_->is_preload_request.get());
+ context_->is_readonly_package.get());
if (!source.empty()) {
LOG(DEBUG) << "Fix location of icon: " << source << " to: " << icon_text;
if (!common_installer::CopyFile(source, icon_text)) {
icon_text, app, icon);
if (status != Status::OK) {
- // ignore copying result in offline for preload apps
- if (strcmp(context_->manifest_data.get()->preload, "true") == 0) {
+ // ignore copying result in offline for readonly apps
+ if (strcmp(context_->manifest_data.get()->readonly, "true") == 0) {
// FIXME: there is no destructor of icon_x exposed but we need to
// remove it. Removing whole list as no valid copy made of any icon.
g_list_free_full(app->icon, [](gpointer data) {
bf::path new_path =
bf::path(getUserManifestPath(context_->uid.get(),
- context_->is_preload_request.get()))
+ context_->is_readonly_package.get()))
/ bf::path(context_->pkgid.get());
new_path += ".xml";
if (!bf::exists(new_path.parent_path())) {
return Step::Status::ERROR;
}
+ std::string readonly_attrib = "readonly";
+ attrib = xmlSetProp(node,
+ reinterpret_cast<libxml_char>(readonly_attrib.c_str()),
+ reinterpret_cast<libxml_char>(context_->manifest_data.get()->readonly));
+
+ if (attrib == nullptr) {
+ LOG(ERROR) << "Failed to set attribute readonly";
+ xmlFreeDoc(doc);
+ return Step::Status::ERROR;
+ }
+
std::string preload_attrib = "preload";
attrib = xmlSetProp(node,
reinterpret_cast<libxml_char>(preload_attrib.c_str()),
return Step::Status::ERROR;
}
+ std::string removable_attrib = "removable";
+ attrib = xmlSetProp(node,
+ reinterpret_cast<libxml_char>(removable_attrib.c_str()),
+ reinterpret_cast<libxml_char>(context_->manifest_data.get()->removable));
+
+ if (attrib == nullptr) {
+ LOG(ERROR) << "Failed to set attribute removable";
+ xmlFreeDoc(doc);
+ return Step::Status::ERROR;
+ }
+
if (xmlSaveFile(xml_path_.c_str(), doc) == -1) {
LOG(ERROR) << "Failed to modify xml file";
xmlFreeDoc(doc);
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
ci::configuration::StepParseManifest::StoreLocation::BACKUP);
+ AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::filesystem::StepEnableExternalMount>();
AddStep<ci::filesystem::StepDeltaPatch>();