From: Junghyun Yeon Date: Mon, 5 Sep 2016 07:11:47 +0000 (+0900) Subject: add StepConvertXml for manifestdirectinstall X-Git-Tag: accepted/tizen/common/20160909.115039^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F46%2F86846%2F6;p=platform%2Fcore%2Fappfw%2Ftpk-backend.git add StepConvertXml for manifestdirectinstall -add StepConvertXml for manifest direct install/update to support FOTA update -add pkg type checking routine to not to convert xml for rpm pkgs Related changes [pkgmgr-tool] : https://review.tizen.org/gerrit/#/c/83327/ [app-installers] : https://review.tizen.org/gerrit/#/c/86789/ [wgt-backend] : https://review.tizen.org/gerrit/#/c/87472/ Change-Id: Icd114c20673c65285287957ef73cf607b629a67d Signed-off-by: Junghyun Yeon --- diff --git a/src/tpk/step/pkgmgr/step_convert_xml.cc b/src/tpk/step/pkgmgr/step_convert_xml.cc index 3da2cef..cf4ab56 100644 --- a/src/tpk/step/pkgmgr/step_convert_xml.cc +++ b/src/tpk/step/pkgmgr/step_convert_xml.cc @@ -38,13 +38,15 @@ common_installer::Step::Status StepConvertXml::precheck() { bf::path xml_path = context_->pkg_path.get(); xml_path /= "tizen-manifest.xml"; - if (!bf::exists(xml_path)) { + if (bf::exists(xml_path)) { + xml_path_ = xml_path; + } else if (bf::exists(context_->xml_path.get())) { + xml_path_ = context_->xml_path.get(); + } else { LOG(ERROR) << "Cannot find manifest file"; return Step::Status::MANIFEST_NOT_FOUND; } - xml_path_ = xml_path; - return Step::Status::OK; } diff --git a/src/tpk/tpk_installer.cc b/src/tpk/tpk_installer.cc index 9b72ac5..13fd3ce 100644 --- a/src/tpk/tpk_installer.cc +++ b/src/tpk/tpk_installer.cc @@ -432,6 +432,7 @@ void TpkInstaller::ManifestDirectInstallSteps() { AddStep( ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::NORMAL); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -458,6 +459,7 @@ void TpkInstaller::ManifestDirectUpdateSteps() { AddStep( ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::NORMAL); + AddStep(); AddStep(); AddStep(); AddStep();