Remove usage of pkgmgr_parser_usr_process_manifest_xml 52/57752/3 submit/tizen/20160122.140520
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 22 Jan 2016 09:42:40 +0000 (10:42 +0100)
committerTomasz Iwanek <t.iwanek@samsung.com>
Fri, 22 Jan 2016 14:03:50 +0000 (06:03 -0800)
This patch removes steps that are no longer in use.

Requires:
 - https://review.tizen.org/gerrit/57751

Change-Id: Idb3e8ee5e20a2b23f57bfe9956ceb6dd0145fa4b

src/common/CMakeLists.txt
src/common/step/step_old_manifest.cc [deleted file]
src/common/step/step_old_manifest.h [deleted file]
src/common/step/step_parse.cc [deleted file]
src/common/step/step_parse.h [deleted file]

index eae3ded..45422d2 100644 (file)
@@ -34,9 +34,7 @@ SET(SRCS
   step/step_recover_storage_directories.cc
   step/step_recovery.cc
   step/step_register_app.cc
-  step/step_old_manifest.cc
   step/step_open_recovery_file.cc
-  step/step_parse.cc
   step/step_privilege_compatibility.cc
   step/step_remove_icons.cc
   step/step_remove_files.cc
diff --git a/src/common/step/step_old_manifest.cc b/src/common/step/step_old_manifest.cc
deleted file mode 100644 (file)
index e6c5cc2..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2015 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_old_manifest.h"
-
-#include <boost/filesystem.hpp>
-
-#include <manifest_parser/utils/logging.h>
-#include <pkgmgr-info.h>
-
-#include <string>
-
-namespace common_installer {
-namespace backup {
-
-namespace bf = boost::filesystem;
-
-Step::Status StepOldManifest::process() {
-  // TODO(t.iwanek): refactor -> this is set in StepGenerateXml too
-  // but for update installation, it is too late
-  // set xml file path
-  bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
-      / bf::path(context_->pkgid.get());
-  xml_path += ".xml";
-  context_->xml_path.set(xml_path);
-
-  if (!bf::exists(context_->xml_path.get())) {
-    LOG(ERROR) << "Missing old platform manifest file";
-    return Status::MANIFEST_NOT_FOUND;
-  }
-
-  xmlInitParser();
-  manifest_x* mfx = pkgmgr_parser_usr_process_manifest_xml(
-      context_->xml_path.get().c_str(), context_->uid.get());
-  if (!mfx) {
-    LOG(ERROR) << "Failed to parse old tizen manifest xml "
-               << context_->xml_path.get();
-    return Step::Status::MANIFEST_ERROR;
-  }
-
-  context_->old_manifest_data.set(mfx);
-
-  LOG(DEBUG) << "Successfully parse old tizen manifest xml for update";
-
-  return Status::OK;
-}
-
-}  // namespace backup
-}  // namespace common_installer
diff --git a/src/common/step/step_old_manifest.h b/src/common/step/step_old_manifest.h
deleted file mode 100644 (file)
index b7b8f5f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2015 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_STEP_OLD_MANIFEST_H_
-#define COMMON_STEP_STEP_OLD_MANIFEST_H_
-
-#include <manifest_parser/utils/logging.h>
-
-#include "common/installer_context.h"
-
-#include "common/step/step.h"
-
-namespace common_installer {
-namespace backup {
-
-class StepOldManifest : public Step {
- public:
-  using Step::Step;
-
-  Status process() override;
-  Status clean() override { return Status::OK; }
-  Status undo() override { return Status::OK; }
-  Status precheck() override { return Status::OK; }
-
-  SCOPE_LOG_TAG(OldManifest)
-};
-
-}  // namespace backup
-}  // namespace common_installer
-
-#endif  // COMMON_STEP_STEP_OLD_MANIFEST_H_
diff --git a/src/common/step/step_parse.cc b/src/common/step/step_parse.cc
deleted file mode 100644 (file)
index ebca269..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* 2014, Copyright © Eurogiciel Coporation, APACHE-2.0, see LICENSE file */
-// Copyright (c) 2015 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_parse.h"
-
-#include <pkgmgr-info.h>
-#include <unistd.h>
-
-#include <boost/filesystem.hpp>
-#include <cassert>
-#include <cstring>
-#include <cstdio>
-#include <string>
-
-#include "common/utils/file_util.h"
-
-namespace common_installer {
-namespace parse {
-
-namespace bf = boost::filesystem;
-
-Step::Status StepParse::process() {
-  bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
-      / bf::path(context_->pkgid.get());
-  xml_path += ".xml";
-
-  context_->xml_path.set(xml_path.string());
-  xmlInitParser();
-  manifest_x* mfx = pkgmgr_parser_usr_process_manifest_xml(
-    context_->xml_path.get().c_str(), context_->uid.get());
-  if (!mfx) {
-    LOG(ERROR) << "Failed to parse tizen manifest xml "
-        << context_->xml_path.get();
-    return Step::Status::PARSE_ERROR;
-  }
-
-  context_->manifest_data.set(mfx);
-
-  context_->pkg_path.set(
-      context_->root_application_path.get() / context_->pkgid.get());
-
-  LOG(DEBUG) << "Successfully parse tizen manifest xml";
-
-  return Status::OK;
-}
-
-}  // namespace parse
-}  // namespace common_installer
diff --git a/src/common/step/step_parse.h b/src/common/step/step_parse.h
deleted file mode 100644 (file)
index 7376554..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 2014, Copyright © Eurogiciel Coporation, APACHE-2.0, see LICENSE file */
-// Copyright (c) 2015 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_STEP_PARSE_H_
-#define COMMON_STEP_STEP_PARSE_H_
-
-#include <manifest_parser/utils/logging.h>
-
-#include "common/installer_context.h"
-
-#include "common/step/step.h"
-
-namespace common_installer {
-namespace parse {
-
-class StepParse : public Step {
- public:
-  using Step::Step;
-
-  Status process() override;
-  Status clean() override { return Status::OK; }
-  Status undo() override { return Status::OK; }
-  Status precheck() override { return Status::OK; }
-
-  SCOPE_LOG_TAG(Parse)
-};
-
-}  // namespace parse
-}  // namespace common_installer
-
-#endif  // COMMON_STEP_STEP_PARSE_H_