add StepConvertXml for manifestdirectinstall 46/86846/6 accepted/tizen/common/20160909.115039 accepted/tizen/ivi/20160909.122422 accepted/tizen/mobile/20160909.122328 accepted/tizen/tv/20160909.122345 accepted/tizen/wearable/20160909.122404 submit/tizen/20160909.054902 submit/tizen/20160909.060412
authorJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 5 Sep 2016 07:11:47 +0000 (16:11 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 9 Sep 2016 01:34:10 +0000 (10:34 +0900)
-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 <jungh.yeon@samsung.com>
src/tpk/step/pkgmgr/step_convert_xml.cc
src/tpk/tpk_installer.cc

index 3da2cef..cf4ab56 100644 (file)
@@ -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;
 }
 
index 9b72ac5..13fd3ce 100644 (file)
@@ -432,6 +432,7 @@ void TpkInstaller::ManifestDirectInstallSteps() {
   AddStep<ci::configuration::StepParseManifest>(
       ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
       ci::configuration::StepParseManifest::StoreLocation::NORMAL);
+  AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
   AddStep<tpk::filesystem::StepCheckPkgDirPath>();
   AddStep<ci::configuration::StepParsePreload>();
@@ -458,6 +459,7 @@ void TpkInstaller::ManifestDirectUpdateSteps() {
   AddStep<ci::configuration::StepParseManifest>(
       ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
       ci::configuration::StepParseManifest::StoreLocation::NORMAL);
+  AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
   AddStep<ci::configuration::StepParsePreload>();
   AddStep<ci::configuration::StepCheckTizenVersion>();