Skip undo operation in StepGenerateXml for ManifestDirectUpdate 78/153978/3
authorDamian Pietruchowski <d.pietruchow@samsung.com>
Wed, 4 Oct 2017 12:49:15 +0000 (14:49 +0200)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 12 Dec 2017 01:29:16 +0000 (01:29 +0000)
Change-Id: Icec22bb6b8ac1d7dd34afdb4a2e0ec04f0ff0369
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
src/wgt/step/pkgmgr/step_generate_xml.cc

index 64a2303c3578ac9c1dd952022887f1c7d86e5d3c..01a1a9512e75a65c9b31b3eb0e7fb0a948951e2d 100644 (file)
@@ -305,6 +305,10 @@ common_installer::Step::Status StepGenerateXml::GenerateApplicationCommonXml(
 }
 
 common_installer::Step::Status StepGenerateXml::undo() {
+  common_installer::RequestType req_type = context_->request_type.get();
+  if (req_type == common_installer::RequestType::ManifestDirectUpdate ||
+      req_type == common_installer::RequestType::ManifestPartialUpdate)
+    return Status::OK;
   common_installer::RemoveAll(context_->xml_path.get());
   return Status::OK;
 }