From: Junghyun Yeon Date: Thu, 22 Dec 2016 07:17:17 +0000 (+0900) Subject: Remove cleardata feature X-Git-Tag: accepted/tizen/3.0/common/20161228.071542^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0ef309d989019f5c9904bcaa717e5e91985f625;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Remove cleardata feature - 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 --- diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 5aef5e2..af34823 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -296,13 +295,6 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) AddStep(); AddStep(); break; - case ci::RequestType::Clear: - AddStep(pkgmgr_); - AddStep( - ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, - ci::configuration::StepParseManifest::StoreLocation::NORMAL); - AddStep(); - break; case ci::RequestType::MountInstall: AddStep(pkgmgr_); AddStep(); diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc index 7b185d3..22ad465 100644 --- a/src/unit_tests/smoke_test.cc +++ b/src/unit_tests/smoke_test.cc @@ -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 index f6bbe18..0000000 Binary files a/src/unit_tests/test_samples/smoke/ClearMode.wgt and /dev/null differ diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 1f6c18c..b1dcd43 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -313,14 +312,6 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); break; } - case ci::RequestType::Clear: { - AddStep(pkgmgr_); - AddStep( - ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, - ci::configuration::StepParseManifest::StoreLocation::NORMAL); - AddStep(); - break; - } case ci::RequestType::MountInstall: { AddStep(pkgmgr_); AddStep();