Remove cleardata feature 01/106601/6 accepted/tizen/3.0/common/20161228.071542 accepted/tizen/3.0/ivi/20161226.030306 accepted/tizen/3.0/mobile/20161226.030138 accepted/tizen/3.0/tv/20161226.030212 accepted/tizen/3.0/wearable/20161226.030238 submit/tizen_3.0/20161223.043050
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 22 Dec 2016 07:17:17 +0000 (16:17 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 23 Dec 2016 04:14:15 +0000 (20:14 -0800)
- Cleardata will be handled by pkg_cleardata
so remove features related with it from backend

Related changes:
[pkgmgr-server] : https://review.tizen.org/gerrit/106486
[pkgmgr-tool] : https://review.tizen.org/gerrit/106485
[app-installers] : https://review.tizen.org/gerrit/105691
[tpk-backend] : https://review.tizen.org/gerrit/106603

Change-Id: I5df69fbe6416fae0188156b0af7d9657951ec32b
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/hybrid/hybrid_installer.cc
src/unit_tests/smoke_test.cc
src/unit_tests/test_samples/smoke/ClearMode.wgt [deleted file]
src/wgt/wgt_installer.cc

index 5aef5e2..af34823 100644 (file)
@@ -17,7 +17,6 @@
 #include <common/step/configuration/step_parse_preload.h>
 #include <common/step/filesystem/step_acquire_external_storage.h>
 #include <common/step/filesystem/step_optional_acquire_external_storage.h>
-#include <common/step/filesystem/step_clear_data.h>
 #include <common/step/filesystem/step_change_ownership_and_permission.h>
 #include <common/step/filesystem/step_copy.h>
 #include <common/step/filesystem/step_copy_storage_directories.h>
@@ -296,13 +295,6 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::filesystem::StepRecoverChangeOwner>();
       AddStep<ci::security::StepRecoverSecurity>();
       break;
-    case ci::RequestType::Clear:
-      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
-      AddStep<ci::configuration::StepParseManifest>(
-          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
-          ci::configuration::StepParseManifest::StoreLocation::NORMAL);
-      AddStep<ci::filesystem::StepClearData>();
-      break;
     case ci::RequestType::MountInstall:
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::mount::StepMountUnpacked>();
index 7b185d3..22ad465 100644 (file)
@@ -366,13 +366,6 @@ ci::AppInstaller::Result DeltaInstall(const bf::path& path,
   return Install(delta_package, type);
 }
 
-ci::AppInstaller::Result Clear(const std::string& pkgid,
-                                   PackageType type,
-                                   RequestResult mode = RequestResult::NORMAL) {
-  const char* argv[] = {"", "-c", pkgid.c_str(), "-u", kTestUserIdStr.c_str()};
-  return CallBackend(SIZEOFARRAY(argv), argv, type, mode);
-}
-
 ci::AppInstaller::Result EnablePackage(const std::string& pkgid,
                                   PackageType type,
                                   RequestResult mode = RequestResult::NORMAL) {
@@ -549,23 +542,6 @@ TEST_F(SmokeTest, DisablePkg) {
   ValidatePackageFS(pkgid, {appid});
 }
 
-TEST_F(SmokeTest, ClearMode) {
-  bf::path path = kSmokePackagesDirectory / "ClearMode.wgt";
-  std::string pkgid = "smokeapp20";
-  std::string appid = "smokeapp20.ClearMode";
-  ASSERT_EQ(Install(path, PackageType::WGT),
-            ci::AppInstaller::Result::OK);
-  bs::error_code error;
-  bf::create_directory(GetPackageRoot(pkgid) / "data" / "dir", error);
-  ASSERT_FALSE(error);
-  ASSERT_TRUE(TouchFile(GetPackageRoot(pkgid) / "data" / "dir" / "file"));
-  ASSERT_TRUE(TouchFile(GetPackageRoot(pkgid) / "data" / "file"));
-  ASSERT_EQ(Clear(pkgid, PackageType::WGT), ci::AppInstaller::Result::OK);
-  ValidatePackage(pkgid, {appid});
-  ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid) / "data" / "dir" / "file"));
-  ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid) / "res" / "file"));
-}
-
 TEST_F(SmokeTest, DeltaMode) {
   bf::path path = kSmokePackagesDirectory / "DeltaMode.wgt";
   bf::path delta_package = kSmokePackagesDirectory / "DeltaMode.delta";
diff --git a/src/unit_tests/test_samples/smoke/ClearMode.wgt b/src/unit_tests/test_samples/smoke/ClearMode.wgt
deleted file mode 100644 (file)
index f6bbe18..0000000
Binary files a/src/unit_tests/test_samples/smoke/ClearMode.wgt and /dev/null differ
index 1f6c18c..b1dcd43 100755 (executable)
@@ -21,7 +21,6 @@
 #include <common/step/filesystem/step_acquire_external_storage.h>
 #include <common/step/filesystem/step_optional_acquire_external_storage.h>
 #include <common/step/filesystem/step_change_ownership_and_permission.h>
-#include <common/step/filesystem/step_clear_data.h>
 #include <common/step/filesystem/step_copy.h>
 #include <common/step/filesystem/step_copy_storage_directories.h>
 #include <common/step/filesystem/step_copy_tep.h>
@@ -313,14 +312,6 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::security::StepRecoverSecurity>();
       break;
     }
-    case ci::RequestType::Clear: {
-      AddStep<ci::configuration::StepConfigure>(pkgmgr_);
-      AddStep<ci::configuration::StepParseManifest>(
-          ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
-          ci::configuration::StepParseManifest::StoreLocation::NORMAL);
-      AddStep<ci::filesystem::StepClearData>();
-      break;
-    }
     case ci::RequestType::MountInstall: {
       AddStep<ci::configuration::StepConfigure>(pkgmgr_);
       AddStep<ci::mount::StepMountUnpacked>();