Replace pkg_path with GetPkgPath() method in InstallerContext
[platform/core/appfw/wgt-backend.git] / src / wgt / step / pkgmgr / step_generate_xml.cc
index 404b5c8..64a2303 100644 (file)
@@ -165,7 +165,7 @@ common_installer::Step::Status StepGenerateXml::GenerateApplicationCommonXml(
   xmlTextWriterWriteAttribute(writer, BAD_CAST "appid", BAD_CAST app->appid);
 
   // binary is a symbolic link named <appid> and is located in <pkgid>/<appid>
-  bf::path exec_path = context_->pkg_path.get()
+  bf::path exec_path = context_->GetPkgPath()
       / bf::path("bin") / bf::path(app->appid);
   xmlTextWriterWriteAttribute(writer, BAD_CAST "exec",
                               BAD_CAST exec_path.string().c_str());
@@ -189,7 +189,7 @@ common_installer::Step::Status StepGenerateXml::GenerateApplicationCommonXml(
     if (!WriteWidgetApplicationAttributesAndElements(writer, app,
         static_cast<WgtBackendData*>(
             context_->backend_data.get())->appwidgets.get(),
-        context_->pkg_path.get() / "shared" / "res"))
+        context_->GetPkgPath() / "shared" / "res"))
       return Status::MANIFEST_ERROR;
     break;
   case AppCompType::WATCHAPP:
@@ -677,14 +677,10 @@ void StepGenerateXml::GenerateShortcuts(xmlTextWriterPtr writer) {
 }
 
 void StepGenerateXml::GenerateTrustAnchor(xmlTextWriterPtr writer) {
-  if (!context_->manifest_data.get()->pkg_certs_dir ||
-      !context_->manifest_data.get()->use_system_certs)
+  if (!context_->manifest_data.get()->use_system_certs)
     return;
 
   xmlTextWriterStartElement(writer, BAD_CAST "trust-anchor");
-  xmlTextWriterWriteAttribute(writer, BAD_CAST "pkg-certs-dir",
-      BAD_CAST context_->manifest_data.get()->pkg_certs_dir);
-
   xmlTextWriterWriteAttribute(writer, BAD_CAST "use-system-certs",
       BAD_CAST context_->manifest_data.get()->use_system_certs);