From ab8b1ecf357b0aff1fc770e88f930182315ca060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E7=AB=8B=E6=B4=8B?= Date: Tue, 16 Jul 2024 02:12:56 +0000 Subject: [PATCH] null the arg to solve openjdk-headless install error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 宋立洋 --- openjdk-21.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openjdk-21.spec b/openjdk-21.spec index 1986d10..3c1cfb8 100644 --- a/openjdk-21.spec +++ b/openjdk-21.spec @@ -897,7 +897,7 @@ Name: java-21-%{origin} Version: %{newjavaver}.%{buildver} # This package needs `.rolling` as part of Release so as to not conflict on install with # java-X-openjdk. I.e. when latest rolling release is also an LTS release packaged as -Release: 3 +Release: 4 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages @@ -1669,9 +1669,10 @@ else end end -- run content of included file with fake args +arg = nil; -- it is better to null the arg up, no meter if they exists or not, and use cjc as module in unified way, instead of relaying on "main" method during require "copy_jdk_configs.lua" cjc = require "copy_jdk_configs.lua" -arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"} -cjc.mainProgram(arg) +args = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"} +cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect this 'main', so it should run under all circumstances, except fatal error %post %{post_script %{nil}} @@ -1796,6 +1797,9 @@ cjc.mainProgram(arg) %changelog +* Tue Jul 16 2024 songliyang - 1:21.0.3.9-4 +- null the arg to solve openjdk-headless install error + * Tue Jun 25 2024 peng.zou - 1:21.0.3.9-3 - init support of ppc64le -- Gitee