From f5c543e7feb019f81278901dcf944ed802bf04be Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Tue, 22 Dec 2015 09:43:17 +0100 Subject: [PATCH] Direct manifest installation should not check signature There is no signature in those packages. Privilege level = PLATFORM is automatically granted for directly installed packages. Change TpkAppQueryInterface::IsAppInstalledByArgv according to other changes. Change-Id: Ie6c5e906aa6e60b71b3ebb8cfa9897a6c080da99 Signed-off-by: jongmyeongko --- src/tpk/tpk_app_query_interface.cc | 22 ++++++---------------- src/tpk/tpk_installer.cc | 1 - 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/tpk/tpk_app_query_interface.cc b/src/tpk/tpk_app_query_interface.cc index 5e816b4..b1e1568 100644 --- a/src/tpk/tpk_app_query_interface.cc +++ b/src/tpk/tpk_app_query_interface.cc @@ -44,23 +44,17 @@ std::string GetInstallationPackagePath(int argc, char** argv) { return path; } -std::string GetXmlPath(int argc, char** argv) { - std::string path; +std::string GetPkgIdFromCmd(int argc, char** argv) { + std::string pkgid; for (int i = 0; i < argc; ++i) { - if (!strcmp(argv[i], "-x")) { + if (!strcmp(argv[i], "-y")) { if (i + 1 < argc) { - path = argv[i + 1]; + pkgid = argv[i + 1]; break; } } } - return path; -} - -std::string GetPkgIdFromXml(const std::string&path) { - bf::path xml_path(path); - - return xml_path.stem().string(); + return pkgid; } std::string GetPkgIdFromPath(const std::string& path) { @@ -101,11 +95,7 @@ bool TpkAppQueryInterface::IsAppInstalledByArgv(int argc, char** argv) { std::string pkg_id; if (path.empty()) { // check if it is manifest direct install - path = GetXmlPath(argc, argv); - if (path.empty()) - return false; - - pkg_id = GetPkgIdFromXml(path); + pkg_id = GetPkgIdFromCmd(argc, argv); } else { pkg_id = GetPkgIdFromPath(path); } diff --git a/src/tpk/tpk_installer.cc b/src/tpk/tpk_installer.cc index 89a95fc..2ca527f 100644 --- a/src/tpk/tpk_installer.cc +++ b/src/tpk/tpk_installer.cc @@ -204,7 +204,6 @@ void TpkInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); -- 2.7.4