From 0f0538eafbb2361498066f8c1671adf6728e9764 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Mon, 4 Sep 2017 17:09:17 +0900 Subject: [PATCH] Fix codes for ManifestDirectInstall in Hybrid pkg - Backend couldn't detect hybrid pkg if pkginfo doesn't exist in db. - ManifestDirectInstall cannot be performed because of reason above. - So change if statement to check designated directory even if there are no information in db. - RO path will be checked only if given uid is privileged one. Change-Id: Ic4855cfa1090b1e5bac1b98d6ca69507657de357 Signed-off-by: Junghyun Yeon --- src/wgt/wgt_app_query_interface.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/wgt/wgt_app_query_interface.cc b/src/wgt/wgt_app_query_interface.cc index 5f931e0..4afdc3d 100644 --- a/src/wgt/wgt_app_query_interface.cc +++ b/src/wgt/wgt_app_query_interface.cc @@ -91,11 +91,14 @@ bool WgtAppQueryInterface::IsHybridApplication(const std::string& arg, info = ReadPkgidFromRecovery(arg); else info = arg; - ci::PkgQueryInterface pkg_query(info, uid); - if (pkg_query.IsPackageInstalled(ci::GetRequestMode(uid))) { - bf::path package_directory(ci::GetRootAppPath(false, uid)); - if (bf::exists(package_directory / info / kTizenManifestLocation) && - bf::exists(package_directory / info / kHybridConfigLocation)) + bf::path rw_package_directory(ci::GetRootAppPath(false, uid)); + bf::path ro_package_directory; + if (uid == tzplatform_getuid(TZ_SYS_GLOBALAPP_USER) || uid == 0) + ro_package_directory = ci::GetRootAppPath(true, uid); + if ((bf::exists(rw_package_directory / info / kTizenManifestLocation) && + bf::exists(rw_package_directory / info / kHybridConfigLocation)) || + (bf::exists(ro_package_directory / info / kTizenManifestLocation) && + bf::exists(ro_package_directory / info / kHybridConfigLocation))) { return true; } else if (!is_recovery) { bool tizen_manifest_found = false; -- 2.7.4