!88 solve openjdk-headless install error due to arg isn't nil

From: @sworn 
Reviewed-by: @kuenking111 
Signed-off-by: @kuenking111
This commit is contained in:
openeuler-ci-bot 2024-07-23 03:18:09 +00:00 committed by Gitee
commit b840ce7d39
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -903,7 +903,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver} Version: %{newjavaver}.%{buildver}
Release: 3 Release: 4
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # 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 # and this change was brought into RHEL-4. java-1.5.0-ibm packages
@ -1709,9 +1709,10 @@ else
end end
end end
-- run content of included file with fake args -- 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" 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}"} args = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
cjc.mainProgram(arg) 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
%{post_script %{nil}} %{post_script %{nil}}
@ -1836,6 +1837,9 @@ cjc.mainProgram(arg)
%changelog %changelog
* Tue Jul 16 2024 songliyang <songliyang@kylinos.cn> - 1:17.0.11.9-4
- null the arg to solve openjdk-headless install error
* Thu Jul 4 2024 Autistic_boyya <wangzhongyi7@huawei.com> - 1:17.0.11.9-3 * Thu Jul 4 2024 Autistic_boyya <wangzhongyi7@huawei.com> - 1:17.0.11.9-3
- add jdk17-Add-KAE-provider.patch - add jdk17-Add-KAE-provider.patch