From d52f00acddad65b3a1319768fa62d0978ccda14e Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Thu, 10 Jun 2021 18:46:44 +0900 Subject: [PATCH 01/16] Release version 0.15.18 Changes: - Change wgt archive info implementation - Call db create functions before starting smoke test - Change class declaration Change-Id: I01a6e953f4007dd6a5ac8e00cba5257d0b078341 Signed-off-by: Ilho Kim --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index a2fffb8..3f83283 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.15.17 +Version: 0.15.18 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 42a8f3de5253549bd6d8ac2a53f258551db63153 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Fri, 18 Jun 2021 09:29:09 +0900 Subject: [PATCH 02/16] Change default symlink of service application [Before] wrt-service-launcher: 'type' attribute exists wrt-service: default [After] wrt-service-launcher: default wrt-service: 'type' is 'standalone' This will apply thread model of service application as default for all profile. Change-Id: I4102cf529bd341793ffed29b218ae697157665ed Signed-off-by: DongHyun Song --- src/wgt/step/filesystem/step_create_wgt_symbolic_link.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wgt/step/filesystem/step_create_wgt_symbolic_link.cc b/src/wgt/step/filesystem/step_create_wgt_symbolic_link.cc index 3b9f132..1ddd796 100644 --- a/src/wgt/step/filesystem/step_create_wgt_symbolic_link.cc +++ b/src/wgt/step/filesystem/step_create_wgt_symbolic_link.cc @@ -63,10 +63,10 @@ bool StepCreateWgtSymbolicLink::CreateSymlinksForApps() { bf::create_symlink(bf::path(kWRTPath), exec_path, error); } else if (strcmp(app->component_type, "widgetapp") == 0) { bf::create_symlink(kWebWidgetRuntimeBinaryPath, exec_path, error); - } else if (!service_app_type[app->appid].empty()) { - bf::create_symlink(kWrtServiceLauncherBinaryPath, exec_path, error); - } else { + } else if (service_app_type[app->appid] == "standalone") { bf::create_symlink(kWrtServiceBinaryPath, exec_path, error); + } else { + bf::create_symlink(kWrtServiceLauncherBinaryPath, exec_path, error); } if (error) { LOG(ERROR) << "Failed to set symbolic link " -- 2.7.4 From ea102d65e5926ee776b301005e3eb778843d5fe3 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Tue, 29 Jun 2021 15:14:52 +0900 Subject: [PATCH 03/16] Release version 0.15.19 Changes: - Change default symlink of service application Change-Id: I90f54ba445d590a9c829f14088c3b4ccfc7225a6 Signed-off-by: Ilho Kim --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 3f83283..9ae878f 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.15.18 +Version: 0.15.19 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 021f507d45cb61957e523bd04161590014d65f18 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 16 Jun 2021 15:10:54 +0900 Subject: [PATCH 04/16] Remove setting installer index InstallerFactory doesn't need to set index. Requires: - https://review.tizen.org/gerrit/c/platform/core/appfw/app-installers/+/259860 Change-Id: I41e66efef3b45362ecdaa1120f42ef3ae0a2eaac Signed-off-by: Sangyoon Jang --- src/hybrid/hybrid_installer_factory.cc | 1 - src/wgt/wgt_installer_factory.cc | 1 - 2 files changed, 2 deletions(-) diff --git a/src/hybrid/hybrid_installer_factory.cc b/src/hybrid/hybrid_installer_factory.cc index 1716765..afc90cc 100644 --- a/src/hybrid/hybrid_installer_factory.cc +++ b/src/hybrid/hybrid_installer_factory.cc @@ -30,7 +30,6 @@ std::unique_ptr HybridInstallerFactory::CreateInstaller( pkgmgr->AddAppQueryInterface(idx, wgt_aqi); installer.reset(new hybrid::HybridInstaller(pkgmgr)); - installer->SetIndex(idx); return installer; } diff --git a/src/wgt/wgt_installer_factory.cc b/src/wgt/wgt_installer_factory.cc index f260647..4beb04f 100644 --- a/src/wgt/wgt_installer_factory.cc +++ b/src/wgt/wgt_installer_factory.cc @@ -29,7 +29,6 @@ std::unique_ptr WgtInstallerFactory::CreateInstaller( pkgmgr->AddAppQueryInterface(idx, wgt_aqi); installer.reset(new wgt::WgtInstaller(pkgmgr)); - installer->SetIndex(idx); return installer; } -- 2.7.4 From ea2bb3726d612f42cbb5db8f853171663a36c1d0 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Mon, 22 Nov 2021 18:16:22 +0900 Subject: [PATCH 05/16] Release version 0.15.20 Changes: - Remove setting installer index Change-Id: I85d9f5fae0cf1b90022fea896ddbceb92220fc9c Signed-off-by: Junghyun Yeon --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 9ae878f..08fdc85 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.15.19 +Version: 0.15.20 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 3ed05bb3347632edb9ec4a74ccbf42e0d4370664 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Thu, 21 Apr 2022 16:40:32 +0900 Subject: [PATCH 06/16] Implement lightuser feature Change-Id: Ic0d3223a51e147ad7f6eb1292decc2b4d50e68c6 Signed-off-by: Junghyun Yeon --- src/wgt/step/configuration/step_parse.cc | 17 ++++++++++++++++- src/wgt/step/configuration/step_parse.h | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index c7d17e6..f9e1615 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -858,8 +859,22 @@ bool StepParse::FillImeInfo() { return true; } +bool StepParse::FillLightUserInfo(manifest_x* manifest) { + auto lightuser_info = GetManifestDataForKey< + const wgt::parse::LightUserInfo>(app_keys::kTizenLightUserKey); + if (!lightuser_info) { + manifest->light_user_switch_mode = strdup("default"); + return true; + } + + manifest->light_user_switch_mode = strdup( + lightuser_info->switch_mode().c_str()); + + return true; +} + bool StepParse::FillExtraManifestInfo(manifest_x* manifest) { - return FillAccounts(manifest) && FillImeInfo() && FillAppWidget(); + return FillAccounts(manifest) && FillImeInfo() && FillAppWidget() && FillLightUserInfo(manifest); } bool StepParse::FillManifestX(manifest_x* manifest) { diff --git a/src/wgt/step/configuration/step_parse.h b/src/wgt/step/configuration/step_parse.h index 0480048..ddf6b7e 100644 --- a/src/wgt/step/configuration/step_parse.h +++ b/src/wgt/step/configuration/step_parse.h @@ -77,6 +77,7 @@ class StepParse : public common_installer::Step { bool FillAdditionalApplications(manifest_x* manifest); bool FillManifestX(manifest_x* manifest); bool FillTrustAnchorInfo(manifest_x* manifest); + bool FillLightUserInfo(manifest_x* manifest); std::unique_ptr parser_; ConfigLocation config_location_; -- 2.7.4 From a07df210a8ca809999007f68d9b65709905c3bf3 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Fri, 22 Apr 2022 15:39:51 +0900 Subject: [PATCH 07/16] Release version 0.15.21 Changes: - Implement lightuser feature Change-Id: I7449d40202e79f7384e14d3f35b9bf3946062ed3 Signed-off-by: Junghyun Yeon --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 08fdc85..53a6d38 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.15.20 +Version: 0.15.21 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 541acf34f3a01ca9b7051981ac29458f06301463 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Thu, 26 May 2022 10:19:48 +0900 Subject: [PATCH 08/16] Remove package for smoke test from 64bit architecture Change-Id: Ia4d167e4adc878e1874d807ea123832df03cb2ee Signed-off-by: Ilho Kim --- packaging/wgt-backend.spec | 10 +++++++++- test/smoke_tests/CMakeLists.txt | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 53a6d38..9bea83d 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -58,7 +58,13 @@ cp %{SOURCE1001} . cp %{SOURCE1002} . %build -%cmake . -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} +%ifnarch x86_64 aarch64 +ISARC64=0 +%else +ISARC64=1 +%endif +%cmake . -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \ + -DISARC64=${ISARC64} make %{?_smp_mflags} %install @@ -94,7 +100,9 @@ ln -s %{_bindir}/wgt-backend %{buildroot}%{_sysconfdir}/package-manager/backend/ %files -n wgt-installer-tests %manifest wgt-installer-tests.manifest %{_bindir}/wgt-installer-ut/* +%ifnarch x86_64 aarch64 %{_datadir}/wgt-installer-ut/* +%endif %{_libdir}/libwgt-smoke-utils.so* %{_includedir}/app-installers/smoke_tests/wgt_smoke_utils.h diff --git a/test/smoke_tests/CMakeLists.txt b/test/smoke_tests/CMakeLists.txt index d89b996..0bd8a0a 100644 --- a/test/smoke_tests/CMakeLists.txt +++ b/test/smoke_tests/CMakeLists.txt @@ -24,7 +24,9 @@ TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_HELPER} PUBLIC ${CMAKE_CURRENT_SO TARGET_INCLUDE_DIRECTORIES(${TARGET_MANIFEST_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../) TARGET_INCLUDE_DIRECTORIES(${TARGET_WGT_SMOKE_UTILS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../) +IF(${ISARC64} MATCHES "0") INSTALL(DIRECTORY test_samples/ DESTINATION ${SHAREDIR}/${DESTINATION_DIR}/test_samples) +ENDIF() APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST} PUBLIC Boost -- 2.7.4 From ba2f91b89838e483b47378e0b5ef1cf7c0ff86db Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Thu, 26 May 2022 11:27:08 +0900 Subject: [PATCH 09/16] Release version 0.15.22 Changes: - Remove package for smoke test from 64bit architecture Change-Id: I10eed26f0e892fcab417413f235807c2a7bd8dbf Signed-off-by: Ilho Kim --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 9bea83d..fbe16a6 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.15.21 +Version: 0.15.22 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 5c9f8a8b94803bf8cc4dec4073437f1410054eb2 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 26 May 2022 17:02:06 +0900 Subject: [PATCH 10/16] Fix crash when failed to read recovery file Change-Id: I29786ba284d1d413afc975e03d234f620d333b01 Signed-off-by: Sangyoon Jang --- src/wgt/utils/wgt_app_query_interface.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wgt/utils/wgt_app_query_interface.cc b/src/wgt/utils/wgt_app_query_interface.cc index 3c6772f..2336a55 100644 --- a/src/wgt/utils/wgt_app_query_interface.cc +++ b/src/wgt/utils/wgt_app_query_interface.cc @@ -43,6 +43,10 @@ const char kTizenManifestLocation[] = "tizen-manifest.xml"; std::string ReadPkgidFromRecovery(const std::string& recovery_path) { std::unique_ptr recovery_file = ci::recovery::RecoveryFile::OpenRecoveryFile(recovery_path); + if (!recovery_file) { + LOG(ERROR) << "Failed to read pkgid from recovery file"; + return "."; + } recovery_file->Detach(); return recovery_file->pkgid(); } -- 2.7.4 From f21eec8229f67f7622e6df06287c04bd057c1287 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Mon, 30 May 2022 13:43:51 +0900 Subject: [PATCH 11/16] Release version 0.15.23 Changes: - Fix crash when failed to read recovery file Change-Id: If25524d15e2776f82cef7b252c1314726ea518a1 Signed-off-by: Sangyoon Jang --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index fbe16a6..8f56446 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.15.22 +Version: 0.15.23 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From b97bf7f655b80c2695f353be0719082b91837611 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Fri, 24 Jun 2022 15:46:43 +0900 Subject: [PATCH 12/16] Fix light user prefix Modify prefix lightuser Related change: [wgt-manifest-handlers]https://review.tizen.org/gerrit/#/c/platform/core/appfw/wgt-manifest-handlers/+/276765/ Change-Id: Ifd99c417d9a2cde2a5580ca22335ad3633d7966a Signed-off-by: Ilho Kim --- src/wgt/step/configuration/step_parse.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index f9e1615..d40be87 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -860,15 +860,15 @@ bool StepParse::FillImeInfo() { } bool StepParse::FillLightUserInfo(manifest_x* manifest) { - auto lightuser_info = GetManifestDataForKey< + auto light_user_info = GetManifestDataForKey< const wgt::parse::LightUserInfo>(app_keys::kTizenLightUserKey); - if (!lightuser_info) { + if (!light_user_info) { manifest->light_user_switch_mode = strdup("default"); return true; } manifest->light_user_switch_mode = strdup( - lightuser_info->switch_mode().c_str()); + light_user_info->switch_mode().c_str()); return true; } -- 2.7.4 From 934a49aa3d03e83bd56d4f84b36463e5ff0cf30f Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Fri, 24 Jun 2022 16:09:28 +0900 Subject: [PATCH 13/16] Release version 0.15.24 Changes: - Fix light user prefix Change-Id: I137539652fe1c5d57fb27e30eff4d76a480b7221 Signed-off-by: Ilho Kim --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 8f56446..f34bd29 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.15.23 +Version: 0.15.24 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From ab5be800980cda31ac46b18e9337101b430d56bf Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Tue, 5 Jul 2022 21:37:53 +0900 Subject: [PATCH 14/16] Implement undo RemovePerUserStorageDirectories If the uninstallation is failed after this step, there is a problem that the user directory remains erased so recreate the user directories removed by this step Change-Id: Ib776b43fd7d9e313c1bb1d3251a9a89cce6e27f8 Signed-off-by: Ilho Kim --- src/hybrid/hybrid_installer.cc | 7 +++++++ src/wgt/wgt_installer.cc | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 37ac600..fd9b5a8 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -124,6 +125,9 @@ void HybridInstaller::UpdateSteps() { void HybridInstaller::UninstallSteps() { AppInstaller::UninstallSteps(); + ReplaceStep( + "RemovePerUserStorageDirectories", + wgt::filesystem::HybridAdditionalSharedDirs); AddStepAfter( "RemovePerUserStorageDirectories"); } @@ -348,6 +352,9 @@ void HybridInstaller::ManifestPartialUpdateSteps() { void HybridInstaller::PartialUninstallSteps() { AppInstaller::PartialUninstallSteps(); + ReplaceStep( + "RemovePerUserStorageDirectories", + wgt::filesystem::HybridAdditionalSharedDirs); AddStepAfter( "RemovePerUserStorageDirectories"); } diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 5b023ae..30997b7 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -115,6 +116,9 @@ void WgtInstaller::UpdateSteps() { void WgtInstaller::UninstallSteps() { AppInstaller::UninstallSteps(); + ReplaceStep( + "RemovePerUserStorageDirectories", + wgt::filesystem::WgtAdditionalSharedDirs); AddStepAfter( "RemovePerUserStorageDirectories"); } @@ -354,6 +358,9 @@ void WgtInstaller::ManifestPartialUpdateSteps() { void WgtInstaller::PartialUninstallSteps() { AppInstaller::PartialUninstallSteps(); + ReplaceStep( + "RemovePerUserStorageDirectories", + wgt::filesystem::WgtAdditionalSharedDirs); AddStepAfter( "RemovePerUserStorageDirectories"); } -- 2.7.4 From e73ffadb5d3e4c99b3437a23d387666f9e759dab Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Fri, 8 Jul 2022 20:20:42 +0900 Subject: [PATCH 15/16] Implement StepRestoreWgtSymbolicLink If the uninstallation fails with the bin path removed recover the wgt symbolic link Change-Id: If1a4fd95be319fded67bd778f21e9abd2fae512a Signed-off-by: Ilho Kim --- src/hybrid/hybrid_installer.cc | 5 ++++ .../filesystem/step_restore_wgt_symbolic_link.cc | 34 ++++++++++++++++++++++ .../filesystem/step_restore_wgt_symbolic_link.h | 34 ++++++++++++++++++++++ src/wgt/wgt_installer.cc | 5 ++++ 4 files changed, 78 insertions(+) create mode 100644 src/wgt/step/filesystem/step_restore_wgt_symbolic_link.cc create mode 100644 src/wgt/step/filesystem/step_restore_wgt_symbolic_link.h diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index fd9b5a8..df7495b 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -33,6 +33,7 @@ #include "wgt/step/encryption/step_remove_encryption_data.h" #include "wgt/step/filesystem/step_copy_preview_icons.h" #include "wgt/step/filesystem/step_create_wgt_symbolic_link.h" +#include "wgt/step/filesystem/step_restore_wgt_symbolic_link.h" #include "wgt/step/filesystem/step_wgt_patch_icons.h" #include "wgt/step/filesystem/step_wgt_patch_storage_directories.h" #include "wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h" @@ -128,6 +129,8 @@ void HybridInstaller::UninstallSteps() { ReplaceStep( "RemovePerUserStorageDirectories", wgt::filesystem::HybridAdditionalSharedDirs); + AddStepAfter( + "RemovePerUserStorageDirectories"); AddStepAfter( "RemovePerUserStorageDirectories"); } @@ -355,6 +358,8 @@ void HybridInstaller::PartialUninstallSteps() { ReplaceStep( "RemovePerUserStorageDirectories", wgt::filesystem::HybridAdditionalSharedDirs); + AddStepAfter( + "RemovePerUserStorageDirectories"); AddStepAfter( "RemovePerUserStorageDirectories"); } diff --git a/src/wgt/step/filesystem/step_restore_wgt_symbolic_link.cc b/src/wgt/step/filesystem/step_restore_wgt_symbolic_link.cc new file mode 100644 index 0000000..0cc2e5e --- /dev/null +++ b/src/wgt/step/filesystem/step_restore_wgt_symbolic_link.cc @@ -0,0 +1,34 @@ +// Copyright (c) 2022 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 "wgt/step/filesystem/step_restore_wgt_symbolic_link.h" + +#include "wgt/step/filesystem/step_create_wgt_symbolic_link.h" + +namespace bf = boost::filesystem; +namespace bs = boost::system; + +namespace wgt { +namespace filesystem { + +common_installer::Step::Status StepRestoreWgtSymbolicLink::undo() { + StepCreateWgtSymbolicLink step(context_); + + Status result = step.precheck(); + if (result != Status::OK) { + LOG(ERROR) << "Fail to execute precheck of CreateWgtSymbolicLink"; + return result; + } + + result = step.process(); + if (result != Status::OK) { + LOG(ERROR) << "Fail to execute process of CreateWgtSymbolicLink"; + return result; + } + + return result; +} + +} // namespace filesystem +} // namespace wgt diff --git a/src/wgt/step/filesystem/step_restore_wgt_symbolic_link.h b/src/wgt/step/filesystem/step_restore_wgt_symbolic_link.h new file mode 100644 index 0000000..f0f141e --- /dev/null +++ b/src/wgt/step/filesystem/step_restore_wgt_symbolic_link.h @@ -0,0 +1,34 @@ +// Copyright (c) 2022 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 WGT_STEP_FILESYSTEM_STEP_RESTORE_WGT_SYMBOLIC_LINK_H_ +#define WGT_STEP_FILESYSTEM_STEP_RESTORE_WGT_SYMBOLIC_LINK_H_ + +#include + +#include +#include + +namespace wgt { +namespace filesystem { + +/** + * \brief Step that create symbolic link to application + */ +class StepRestoreWgtSymbolicLink : public common_installer::Step { + public: + using Step::Step; + + Status precheck() override { return Status::OK; } + Status process() override { return Status::OK; } + Status clean() override { return Status::OK; } + Status undo() override; + + STEP_NAME(RestoreWgtSymbolicLink) +}; + +} // namespace filesystem +} // namespace wgt + +#endif // WGT_STEP_FILESYSTEM_STEP_RESTORE_WGT_SYMBOLIC_LINK_H_ diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 30997b7..d79b585 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -26,6 +26,7 @@ #include "wgt/step/encryption/step_remove_encryption_data.h" #include "wgt/step/filesystem/step_copy_preview_icons.h" #include "wgt/step/filesystem/step_create_wgt_symbolic_link.h" +#include "wgt/step/filesystem/step_restore_wgt_symbolic_link.h" #include "wgt/step/filesystem/step_wgt_patch_icons.h" #include "wgt/step/filesystem/step_wgt_patch_storage_directories.h" #include "wgt/step/filesystem/step_wgt_prepare_package_directory.h" @@ -119,6 +120,8 @@ void WgtInstaller::UninstallSteps() { ReplaceStep( "RemovePerUserStorageDirectories", wgt::filesystem::WgtAdditionalSharedDirs); + AddStepAfter( + "RemovePerUserStorageDirectories"); AddStepAfter( "RemovePerUserStorageDirectories"); } @@ -361,6 +364,8 @@ void WgtInstaller::PartialUninstallSteps() { ReplaceStep( "RemovePerUserStorageDirectories", wgt::filesystem::WgtAdditionalSharedDirs); + AddStepAfter( + "RemovePerUserStorageDirectories"); AddStepAfter( "RemovePerUserStorageDirectories"); } -- 2.7.4 From ae4a97529841338c3b0905f67551bf751a3e46a1 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Wed, 24 Aug 2022 17:57:37 +0900 Subject: [PATCH 16/16] Release version 0.15.25 Changes: - Implement undo RemovePerUserStorageDirectories - Implement StepRestoreWgtSymbolicLink Change-Id: Ib329dfca791c3b196297ef9cec2cb81bf57588d5 Signed-off-by: Ilho Kim --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index f34bd29..9b46696 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.15.24 +Version: 0.15.25 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4