From b180efb32186448ed1c57d13dc38a5e82bd9b7c8 Mon Sep 17 00:00:00 2001 From: Soyoung Kim Date: Mon, 1 Jul 2013 16:12:47 +0900 Subject: [PATCH] Fixed upgrade to preload hybird app. [Issue#] N/A [Problem] failed upgrade to preload hybrid app. [Cause] there was a issue about package api call. [Solution] always call package api call when hybrid app. [SCMRequest] N/A Change-Id: I02e3c3240b1a0bdcf43f144011d03d0affbc9b6a --- src/jobs/widget_install/task_install_ospsvc.cpp | 35 +++++++++++-------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/jobs/widget_install/task_install_ospsvc.cpp b/src/jobs/widget_install/task_install_ospsvc.cpp index 0ef8990..b3e3374 100644 --- a/src/jobs/widget_install/task_install_ospsvc.cpp +++ b/src/jobs/widget_install/task_install_ospsvc.cpp @@ -103,25 +103,22 @@ void TaskInstallOspsvc::StepUpdateManifestFile() std::string pkgid = DPL::ToUTF8String(m_context.widgetConfig.tzPkgid); pkgmgrinfo_pkginfo_h handle; - int ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid.c_str(), &handle); - if (ret != PMINFO_R_OK) { - LogDebug("StepUpdateManifestFile"); - std::ostringstream manifest_file; - if (m_context.mode.rootPath == InstallMode::RootPath::RO) { - manifest_file << "/usr/share/packages/"; //TODO constant with path - } else { - manifest_file << "/opt/share/packages/"; //TODO constant with path - } - manifest_file << pkgid; - manifest_file << ".xml"; - LogDebug("manifest file : " << manifest_file.str()); - - int code = pkgmgr_parser_parse_manifest_for_upgrade( - manifest_file.str().c_str(), NULL); - - if (code != 0) { - LogError("Manifest parser error: " << code); - } + LogDebug("StepUpdateManifestFile"); + std::ostringstream manifest_file; + if (m_context.mode.rootPath == InstallMode::RootPath::RO) { + manifest_file << "/usr/share/packages/"; //TODO constant with path + } else { + manifest_file << "/opt/share/packages/"; //TODO constant with path + } + manifest_file << pkgid; + manifest_file << ".xml"; + LogDebug("manifest file : " << manifest_file.str()); + + int code = pkgmgr_parser_parse_manifest_for_upgrade( + manifest_file.str().c_str(), NULL); + + if (code != 0) { + LogError("Manifest parser error: " << code); } } } //namespace WidgetInstall -- 2.7.4