if (!bf::exists(xml_path)) {
LOG(ERROR) << "Cannot find manifest file";
- return Step::Status::INVALID_VALUE;
+ return Step::Status::MANIFEST_NOT_FOUND;
}
xml_path_ = xml_path;
xmlDocPtr doc = xmlParseFile(xml_path_.string().c_str());
if (!doc) {
LOG(ERROR) << "Failed to parse xml file";
- return Step::Status::ERROR;
+ return Step::Status::MANIFEST_ERROR;
}
if (!ConvertXml(doc))
- return Step::Status::ERROR;
+ return Step::Status::MANIFEST_ERROR;
bf::path new_path = bf::path(getUserManifestPath(context_->uid.get()))
/ bf::path(context_->pkgid.get());
new_path += ".xml";
if (xmlSaveFile(new_path.string().c_str(), doc) == -1) {
LOG(ERROR) << "Failed to write xml file";
- return Step::Status::ERROR;
+ return Step::Status::MANIFEST_ERROR;
}
context_->xml_path.set(new_path.string());
if (pkgmgr_parser_check_manifest_validation(
context_->xml_path.get().c_str()) != 0) {
LOG(ERROR) << "Manifest is not valid";
- return Step::Status::ERROR;
+ return Step::Status::MANIFEST_ERROR;
}
LOG(DEBUG) << "Successfully create manifest xml "
if (!boost::filesystem::exists(tmp)) {
LOG(ERROR) << "manifest not found from the package";
- return common_installer::Step::Status::INVALID_VALUE;
+ return common_installer::Step::Status::MANIFEST_NOT_FOUND;
}
return common_installer::Step::Status::OK;
// TODO(jungh.yeon) : this function should be re-considered
bf::path StepParse::FindIcon(const std::string& filename) {
-
bf::path icon_path;
bf::path app_path;
if (access(icon_path.c_str(), F_OK) == 0)
return icon_path;
- icon_path = bf::path(getIconPath(context_->uid.get()) / bf::path("default/small") / filename);
+ icon_path = bf::path(getIconPath(context_->uid.get()) /
+ bf::path("default/small") / filename);
if (access(icon_path.c_str(), F_OK) == 0)
return icon_path;
- if (context_->uid.get() == GLOBAL_USER)
+ if (context_->uid.get() == GLOBAL_USER) {
app_path = tzplatform_getenv(TZ_SYS_RW_APP);
- else {
+ } else {
tzplatform_set_user(context_->uid.get());
app_path = tzplatform_getenv(TZ_USER_APP);
tzplatform_reset_user();
common_installer::Step::Status StepParse::process() {
if (!LocateConfigFile()) {
LOG(ERROR) << "No manifest file exists";
- return common_installer::Step::Status::ERROR;
+ return common_installer::Step::Status::MANIFEST_NOT_FOUND;
}
parser_.reset(new tpk::parse::TPKConfigParser());
if (!parser_->ParseManifest(path_)) {
LOG(ERROR) << "[Parse] Parse failed. " << parser_->GetErrorMessage();
- return common_installer::Step::Status::ERROR;
+ return common_installer::Step::Status::PARSE_ERROR;
}
manifest_x* manifest =
if (!FillManifestX(const_cast<manifest_x*>(manifest))) {
LOG(ERROR) << "[Parse] Storing manifest_x failed. "
<< parser_->GetErrorMessage();
- return common_installer::Step::Status::ERROR;
+ return common_installer::Step::Status::PARSE_ERROR;
}
if (!context_->tep_path.get().empty())