From 0d640c227d2a57b0f0b1c1519305ebca669ba977 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szulakiewicz Date: Mon, 8 Feb 2016 15:52:31 +0100 Subject: [PATCH] Move step remove manifest to app-installer Requires: https://review.tizen.org/gerrit/59034 https://review.tizen.org/gerrit/59035 Change-Id: I0ecb72b1b9ea005c7beef34e35cfcef4fb884b04 --- src/hybrid/hybrid_installer.cc | 4 ++-- src/wgt/CMakeLists.txt | 1 - src/wgt/step/step_wgt_remove_manifest.cc | 40 -------------------------------- src/wgt/step/step_wgt_remove_manifest.h | 40 -------------------------------- src/wgt/wgt_installer.cc | 5 ++-- 5 files changed, 4 insertions(+), 86 deletions(-) delete mode 100644 src/wgt/step/step_wgt_remove_manifest.cc delete mode 100644 src/wgt/step/step_wgt_remove_manifest.h diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 0a88baf..48e693d 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -55,7 +56,6 @@ #include "wgt/step/step_remove_encryption_data.h" #include "wgt/step/step_wgt_patch_icons.h" #include "wgt/step/step_wgt_patch_storage_directories.h" -#include "wgt/step/step_wgt_remove_manifest.h" namespace ci = common_installer; @@ -141,7 +141,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); break; case ci::RequestType::Reinstall: // RDS is not supported for hybrid apps diff --git a/src/wgt/CMakeLists.txt b/src/wgt/CMakeLists.txt index 405d9e4..6cb1e7a 100644 --- a/src/wgt/CMakeLists.txt +++ b/src/wgt/CMakeLists.txt @@ -14,7 +14,6 @@ SET(SRCS step/step_wgt_patch_icons.cc step/step_wgt_patch_storage_directories.cc step/step_wgt_resource_directory.cc - step/step_wgt_remove_manifest.cc step/step_add_default_privileges.cc wgt_app_query_interface.cc wgt_installer.cc diff --git a/src/wgt/step/step_wgt_remove_manifest.cc b/src/wgt/step/step_wgt_remove_manifest.cc deleted file mode 100644 index 68a982e..0000000 --- a/src/wgt/step/step_wgt_remove_manifest.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved -// Use of this source code is governed by a apache 2.0 license that can be -// found in the LICENSE file. - -#include "wgt/step/step_wgt_remove_manifest.h" - -#include -#include -#include - -#include -#include - -#include -#include - -#include "common/utils/file_util.h" - -namespace bf = boost::filesystem; -namespace bs = boost::system; - -namespace wgt { -namespace pkgmgr { - - -common_installer::Step::Status StepRemoveManifest::process() { - bs::error_code error; - bf::remove(context_->xml_path.get(), error); - - if (error) { - LOG(ERROR) << "Failed to remove xml manifest file"; - return Status::MANIFEST_ERROR; - } - LOG(DEBUG) << "Manifest file removed"; - return Status::OK; -} - - -} // namespace wgt -} // namespace pkgmgr diff --git a/src/wgt/step/step_wgt_remove_manifest.h b/src/wgt/step/step_wgt_remove_manifest.h deleted file mode 100644 index 459d633..0000000 --- a/src/wgt/step/step_wgt_remove_manifest.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved -// Use of this source code is governed by a apache 2.0 license that can be -// found in the LICENSE file. - -#ifndef WGT_STEP_STEP_WGT_REMOVE_MANIFEST_H_ -#define WGT_STEP_STEP_WGT_REMOVE_MANIFEST_H_ - -#include - -#include "common/installer_context.h" -#include "common/step/step.h" - -namespace wgt { -namespace pkgmgr { - -/** - * \brief Step responsbile for removing manifest file during uninstallation - */ -class StepRemoveManifest : public common_installer::Step { - public: - using common_installer::Step::Step; - - /** - * \brief main logic of remove manifest - * - * \return Status::OK if success, Status::ERROR otherwise - */ - Status process() override; - - Status clean() override { return Status::OK; } - Status undo() override { return Status::OK; } - Status precheck() override { return Status::OK; } - - SCOPE_LOG_TAG(RemoveManifest) -}; - -} // namespace pkgmgr -} // namespace wgt - -#endif // WGT_STEP_STEP_WGT_REMOVE_MANIFEST_H_ diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 2397ebd..4eec68c 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -41,9 +41,9 @@ #include #include #include +#include #include - #include "wgt/step/step_add_default_privileges.h" #include "wgt/step/step_check_settings_level.h" #include "wgt/step/step_check_wgt_background_category.h" @@ -58,7 +58,6 @@ #include "wgt/step/step_wgt_patch_icons.h" #include "wgt/step/step_wgt_patch_storage_directories.h" #include "wgt/step/step_wgt_resource_directory.h" -#include "wgt/step/step_wgt_remove_manifest.h" namespace ci = common_installer; @@ -133,7 +132,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); break; } case ci::RequestType::Reinstall: { -- 2.7.4