From a07df210a8ca809999007f68d9b65709905c3bf3 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Fri, 22 Apr 2022 15:39:51 +0900 Subject: [PATCH 01/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 02/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 03/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 04/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 05/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 06/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 07/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 08/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 09/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 10/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 From 9f899c0fa84e44fcabe06c15765efc4b759557f9 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Tue, 13 Sep 2022 11:22:43 +0900 Subject: [PATCH 11/16] Try to remove the location of the extract entry Because MountInstall is performed when there is no manifest a file may exist in the extract entry path, so remove that Related: [app-installers]https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/281054/ Change-Id: I26e93e345779df832b421758f99d9600aa5bde3a Signed-off-by: Ilho Kim --- src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc b/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc index 4e90b29..2439ded 100644 --- a/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc +++ b/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc @@ -88,9 +88,12 @@ ci::Step::Status StepWgtPreparePackageDirectory::ExtractEntries() { } for (auto& entry : GetExtractEntries()) { - if (context_->request_type.get() == ci::RequestType::MountUpdate) + if (context_->request_type.get() == ci::RequestType::MountInstall) { + ci::RemoveAll(resource_path / entry); + } else if (context_->request_type.get() == ci::RequestType::MountUpdate) { if (!ci::BackupDir(resource_path, backup_path, entry)) return Status::APP_DIR_ERROR; + } if (!ci::ExtractToTmpDir(context_->file_path.get().c_str(), resource_path.c_str(), entry)) { -- 2.7.4 From dfdea00641995df48a972299dbeb60ba272917b7 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Wed, 14 Sep 2022 16:21:57 +0900 Subject: [PATCH 12/16] Release version 0.15.26 Changes: - Try to remove the location of the extract entry Change-Id: I8dfffbe625810b379ed27b5142829464e4ea382c 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 9b46696..3c568f7 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.25 +Version: 0.15.26 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 4010df0327593e18531f921bc0f23675124a5db4 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Mon, 19 Sep 2022 17:14:43 +0900 Subject: [PATCH 13/16] Fix static analysis issue Change-Id: I010cb0d5dd7f41c56f10db975db72b53e8b8c84d Signed-off-by: Sangyoon Jang --- src/wgt/utils/extension_config_parser.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wgt/utils/extension_config_parser.cc b/src/wgt/utils/extension_config_parser.cc index 684c292..93d0abf 100644 --- a/src/wgt/utils/extension_config_parser.cc +++ b/src/wgt/utils/extension_config_parser.cc @@ -38,6 +38,11 @@ std::unique_ptr return nullptr; } root_node = xmlDocGetRootElement(doc); + if (!root_node) { + LOG(ERROR) << "Failed to get root element from " << config_xml; + xmlFreeDoc(doc); + return nullptr; + } std::unique_ptr dv = LoadXMLNode(root_node); std::unique_ptr result(new parser::DictionaryValue); if (dv) -- 2.7.4 From 99de35b457fad1e5d99424b6c1fa20ae7f05700e Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 20 Sep 2022 15:08:19 +0900 Subject: [PATCH 14/16] Release version 0.15.27 Changes: - Fix static analysis issue Change-Id: I8b5da545471ce0856de6d6aef1f19740797b2cb8 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 3c568f7..3147cd7 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.26 +Version: 0.15.27 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 2f69ae753aa94a29658d6ca28859dd4cb9b697dd Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Thu, 22 Sep 2022 14:13:39 +0900 Subject: [PATCH 15/16] Fix static analysis issue - Null pointer dereference Change-Id: Ie3dda3872cf472d9c3a76a4b1f7738d6725bb5c6 Signed-off-by: Ilho Kim --- src/hybrid/step/pkgmgr/step_merge_xml.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hybrid/step/pkgmgr/step_merge_xml.cc b/src/hybrid/step/pkgmgr/step_merge_xml.cc index 8b6fbb3..4a3cd7d 100644 --- a/src/hybrid/step/pkgmgr/step_merge_xml.cc +++ b/src/hybrid/step/pkgmgr/step_merge_xml.cc @@ -98,6 +98,10 @@ xmlNodePtr StepMergeXml::GetXmlNode(const xmlDocPtr doc, void StepMergeXml::MergeXmlNode(xmlNodePtr node1, xmlNodePtr node2) { xmlNodePtr last = xmlGetLastChild(node1); + if (!last) { + LOG(ERROR) << "Failed to get last child node"; + return; + } xmlNodePtr next; // merge node2's child into node1 for (xmlNodePtr cur = node2->children; cur; cur = next) { -- 2.7.4 From 117a7d9d257bf3aa238afacace19e044870a1607 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Thu, 22 Sep 2022 15:29:18 +0900 Subject: [PATCH 16/16] Release version 0.15.28 Changes: - Fix static analysis issue Change-Id: I1799ced2e7db107e670bff1154b3a4bab5dddc5e 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 3147cd7..7ab44d9 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.27 +Version: 0.15.28 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4