step/step_update_app.cc
step/step_update_security.cc
step/step_update_tep.cc
+ step/step_remove_manifest.cc
utils/dynamic_lib_handle.cc
utils/file_util.cc
utils/subprocess.cc
namespace bs = boost::system;
namespace bf = boost::filesystem;
+
namespace common_installer {
namespace filesystem {
namespace bs = boost::system;
namespace bf = boost::filesystem;
+
namespace common_installer {
namespace filesystem {
--- /dev/null
+// 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 "common/step/step_remove_manifest.h"
+
+#include <boost/filesystem/path.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/system/error_code.hpp>
+
+#include <pkgmgr-info.h>
+#include <pkgmgr_installer.h>
+
+#include <algorithm>
+#include <string>
+
+#include "common/utils/file_util.h"
+
+namespace bf = boost::filesystem;
+namespace bs = boost::system;
+
+namespace common_installer {
+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
--- /dev/null
+// 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 COMMON_STEP_REMOVE_MANIFEST_H_
+#define COMMON_STEP_REMOVE_MANIFEST_H_
+
+#include <manifest_parser/utils/logging.h>
+
+#include "common/installer_context.h"
+#include "common/step/step.h"
+
+namespace common_installer {
+namespace pkgmgr {
+
+/**
+ * \brief Step responsbile for removing manifest file during uninstallation
+ */
+class StepRemoveManifest : public Step {
+ public:
+ using 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 common_installer
+
+#endif // COMMON_STEP_REMOVE_MANIFEST_H_