From db794e13be8b0c4f8ad7e91501b337594fa28a35 Mon Sep 17 00:00:00 2001 From: curried Date: Tue, 12 Aug 2025 23:36:47 +0800 Subject: [PATCH 1/2] Fix updater build config deps problem Signed-off-by: curried --- BUILD.gn | 7 +------ bundle.json | 4 +++- test/unittest/script/BUILD.gn | 9 +++------ updater_default_cfg.gni | 11 ++++++++--- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index ce77ae8e..8d5e3050 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -57,12 +57,7 @@ group("unittest") { "test/unittest/flashd_test:flashd_utils_unittest", ] } - if (updater_cfg_file == "") { - deps += [ - "test/unittest/script:user_instruction", - "test/unittest/script:user_instruction_invalid", - ] - } + if (updater_ui_support) { deps += [ "test/unittest/service_test:updater_service_unittest", diff --git a/bundle.json b/bundle.json index 375512ad..343501b8 100644 --- a/bundle.json +++ b/bundle.json @@ -40,7 +40,9 @@ "syscap": [], "features": [ "updater_ui_support", - "updater_cfg_file" + "updater_cfg_file", + "updater_feature_use_ptable", + "updater_feature_use_as_executable" ], "adapted_system_type": [ "standard" ], "rom": "", diff --git a/test/unittest/script/BUILD.gn b/test/unittest/script/BUILD.gn index 9aa58ee5..7ccb04c7 100644 --- a/test/unittest/script/BUILD.gn +++ b/test/unittest/script/BUILD.gn @@ -75,13 +75,10 @@ ohos_unittest("script_unittest") { "${updater_path}/services/package:libupdaterpackage", "${updater_path}/services/script:gen_yacc", "${updater_path}/utils:libutils", + "${updater_path}/test/unittest/script:user_instruction", + "${updater_path}/test/unittest/script:user_instruction_invalid", ] - if (updater_cfg_file != "") { - deps += [ - "${updater_path}/test/unittest/script:user_instruction", - "${updater_path}/test/unittest/script:user_instruction_invalid", - ] - } + configs = [ "${updater_path}/test/unittest:utest_config" ] external_deps = [ "bounds_checking_function:libsec_static", diff --git a/updater_default_cfg.gni b/updater_default_cfg.gni index 130b14a9..67446ede 100644 --- a/updater_default_cfg.gni +++ b/updater_default_cfg.gni @@ -16,6 +16,8 @@ import("//build/ohos.gni") init_feature_ab_partition = true declare_args() { updater_cfg_file = "" + updater_feature_use_ptable = true + updater_feature_use_as_executable = false updater_ui_support = true if (!defined(global_parts_info.arkui_ui_lite)) { updater_ui_support = false @@ -32,13 +34,16 @@ declare_args() { } } -if (updater_cfg_file != "") { +if (!updater_feature_use_as_executable) { updater_sign_on_server = true - import("${updater_cfg_file}") +} + +if (updater_feature_use_ptable) { + use_ptable = "enable" } template("updater_gen") { - if (updater_cfg_file != "") { + if (!updater_feature_use_as_executable) { ohos_source_set(target_name) { forward_variables_from(invoker, "*") } -- Gitee From 62daec1e048ba9955bdfb1b7783d3f2072cab715 Mon Sep 17 00:00:00 2001 From: curried Date: Wed, 13 Aug 2025 22:10:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B0=86=E5=8A=9F=E8=83=BD=E7=89=B9?= =?UTF-8?q?=E6=80=A7=E5=BC=80=E5=85=B3updater=5Fsign=5Fon=5Fserver?= =?UTF-8?q?=E6=8A=BD=E8=B1=A1=E6=88=90=E4=B8=80=E4=B8=AA=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E7=89=B9=E6=80=A7=E6=9D=A5=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: curried --- bundle.json | 3 ++- updater_default_cfg.gni | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bundle.json b/bundle.json index 343501b8..1e9e2f9d 100644 --- a/bundle.json +++ b/bundle.json @@ -42,7 +42,8 @@ "updater_ui_support", "updater_cfg_file", "updater_feature_use_ptable", - "updater_feature_use_as_executable" + "updater_feature_updater_gen_executable", + "updater_feature_sign_on_server" ], "adapted_system_type": [ "standard" ], "rom": "", diff --git a/updater_default_cfg.gni b/updater_default_cfg.gni index 67446ede..37c38b04 100644 --- a/updater_default_cfg.gni +++ b/updater_default_cfg.gni @@ -17,7 +17,8 @@ init_feature_ab_partition = true declare_args() { updater_cfg_file = "" updater_feature_use_ptable = true - updater_feature_use_as_executable = false + updater_feature_updater_gen_executable = false + updater_feature_sign_on_server = true updater_ui_support = true if (!defined(global_parts_info.arkui_ui_lite)) { updater_ui_support = false @@ -25,7 +26,7 @@ declare_args() { updater_hdc_depend = true updater_absolutely_path = "//base/update/updater" hdc_base = "//developtools/hdc" - updater_sign_on_server = false + updater_sign_on_server = true updater_zlib_enable = true if (defined(global_parts_info) && @@ -34,7 +35,7 @@ declare_args() { } } -if (!updater_feature_use_as_executable) { +if (updater_feature_sign_on_server) { updater_sign_on_server = true } @@ -43,7 +44,7 @@ if (updater_feature_use_ptable) { } template("updater_gen") { - if (!updater_feature_use_as_executable) { + if (!updater_feature_updater_gen_executable) { ohos_source_set(target_name) { forward_variables_from(invoker, "*") } -- Gitee