Remove blacklist feature 47/69947/2 accepted/tizen/common/20160518.125117 accepted/tizen/ivi/20160518.090804 accepted/tizen/mobile/20160518.090832 accepted/tizen/tv/20160518.090739 accepted/tizen/wearable/20160518.090725 submit/tizen/20160518.054712
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 17 May 2016 09:45:14 +0000 (18:45 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 17 May 2016 23:10:09 +0000 (16:10 -0700)
Blacklist feature is integrated with restriction mode.
It will be added when its done.

Change-Id: Ie3346e1b39ce9164e6308ad985ce54ee760a44c8
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/common/CMakeLists.txt
src/common/step/pkgmgr/step_check_blacklist.cc [deleted file]
src/common/step/pkgmgr/step_check_blacklist.h [deleted file]

index 277029f..9b853b2 100644 (file)
@@ -49,7 +49,6 @@ SET(SRCS
   step/mount/step_mount_install.cc
   step/mount/step_mount_unpacked.cc
   step/mount/step_mount_update.cc
-  step/pkgmgr/step_check_blacklist.cc
   step/pkgmgr/step_check_removable.cc
   step/pkgmgr/step_kill_apps.cc
   step/pkgmgr/step_recover_application.cc
diff --git a/src/common/step/pkgmgr/step_check_blacklist.cc b/src/common/step/pkgmgr/step_check_blacklist.cc
deleted file mode 100644 (file)
index ff033c1..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache 2.0 license that can be
-// found in the LICENSE file.
-
-#include "common/step/pkgmgr/step_check_blacklist.h"
-
-#include <package-manager.h>
-
-#include "common/app_installer.h"
-#include "common/step/step.h"
-
-namespace common_installer {
-namespace pkgmgr {
-
-Step::Status StepCheckBlacklist::process() {
-  if (context_->installation_mode.get() == InstallationMode::OFFLINE ||
-      context_->is_preload_request.get())
-    return Status::OK;
-  bool result;
-  pkgmgr_client* pc = pkgmgr_client_new(PC_REQUEST);
-  if (!pc)
-    return Status::ERROR;
-  int ret = context_->request_mode.get() != RequestMode::GLOBAL ?
-      pkgmgr_client_usr_check_blacklist(pc, context_->pkgid.get().c_str(),
-          &result, context_->uid.get()) :
-      pkgmgr_client_check_blacklist(pc, context_->pkgid.get().c_str(),
-          &result);
-  pkgmgr_client_free(pc);
-  if (ret != PKGMGR_R_OK)
-    return Status::ERROR;
-
-  if (result) {
-    LOG(ERROR) << "This package is blacklisted";
-    return Status::OPERATION_NOT_ALLOWED;
-  }
-
-  return Status::OK;
-}
-
-Step::Status StepCheckBlacklist::precheck() {
-  if (context_->pkgid.get().empty())
-    return Status::INVALID_VALUE;
-  return Status::OK;
-}
-
-}  // namespace pkgmgr
-}  // namespace common_installer
diff --git a/src/common/step/pkgmgr/step_check_blacklist.h b/src/common/step/pkgmgr/step_check_blacklist.h
deleted file mode 100644 (file)
index 35510a6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache 2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef COMMON_STEP_PKGMGR_STEP_CHECK_BLACKLIST_H_
-#define COMMON_STEP_PKGMGR_STEP_CHECK_BLACKLIST_H_
-
-#include "common/step/step.h"
-
-namespace common_installer {
-namespace pkgmgr {
-
-class StepCheckBlacklist : public Step {
- public:
-  using Step::Step;
-
-  Status process() override;
-  Status undo() override { return Status::OK; }
-  Status clean() override { return Status::OK; }
-  Status precheck() override;
-
-  SCOPE_LOG_TAG(Blacklist)
-};
-
-}  // namespace pkgmgr
-}  // namespace common_installer
-
-#endif  // COMMON_STEP_PKGMGR_STEP_CHECK_BLACKLIST_H_