bool check_start_file)
: Step(context),
config_location_(config_location),
- check_start_file_(check_start_file) {
+ check_start_file_(check_start_file),
+ ui_app_not_exists_(false) {
}
std::set<std::string> StepParse::ExtractPrivileges(
return true;
if (app_info.get()->id().empty()) {
+ ui_app_not_exists_ = true;
if (!AllServiceAppGlobal()) {
LOG(ERROR) << "Empty of ui app's id is possible"
<< " when service app types are all global";
return common_installer::Step::Status::PARSE_ERROR;
}
- WgtBackendData* backend_data =
- static_cast<WgtBackendData*>(context_->backend_data.get());
-
- if (check_start_file_) {
- if (!parser_->CheckValidStartFile()) {
- LOG(ERROR) << parser_->GetErrorMessage();
- return common_installer::Step::Status::PARSE_ERROR;
- }
- if (!parser_->CheckValidServicesStartFiles()) {
- LOG(ERROR) << parser_->GetErrorMessage();
- return common_installer::Step::Status::PARSE_ERROR;
- }
- } else {
- // making backup of content data and services content data
- auto content_info = GetManifestDataForKey<const wgt::parse::ContentInfo>(
- app_keys::kTizenContentKey);
- auto service_list = GetManifestDataForKey<const wgt::parse::ServiceList>(
- app_keys::kTizenServiceKey);
- if (content_info)
- backend_data->content.set(*content_info);
- if (service_list)
- backend_data->service_list.set(*service_list);
- }
-
// Copy data from ManifestData to InstallerContext
auto info = GetManifestDataForKey<const wgt::parse::TizenApplicationInfo>(
app_keys::kTizenApplicationKey);
return common_installer::Step::Status::PARSE_ERROR;
}
+ WgtBackendData* backend_data =
+ static_cast<WgtBackendData*>(context_->backend_data.get());
+
+ if (check_start_file_) {
+ if (!ui_app_not_exists_ && !parser_->CheckValidStartFile()) {
+ LOG(ERROR) << parser_->GetErrorMessage();
+ pkgmgr_parser_free_manifest_xml(manifest);
+ return common_installer::Step::Status::PARSE_ERROR;
+ }
+ if (!parser_->CheckValidServicesStartFiles()) {
+ LOG(ERROR) << parser_->GetErrorMessage();
+ pkgmgr_parser_free_manifest_xml(manifest);
+ return common_installer::Step::Status::PARSE_ERROR;
+ }
+ } else {
+ // making backup of content data and services content data
+ auto content_info = GetManifestDataForKey<const wgt::parse::ContentInfo>(
+ app_keys::kTizenContentKey);
+ auto service_list = GetManifestDataForKey<const wgt::parse::ServiceList>(
+ app_keys::kTizenServiceKey);
+ if (content_info)
+ backend_data->content.set(*content_info);
+ if (service_list)
+ backend_data->service_list.set(*service_list);
+ }
+
context_->pkgid.set(manifest->package);
// write pkgid for recovery file