Fix for "%undefine _auto_set_build_XX" usage

Fix for using "%undefine  _auto_set_build_XX" casue error:

macro expansion did not return an integer: %{_auto_set_build_flags} ? "%{set_build_flags}" : ""

Signed-off-by: liyunfei <liyunfei33@huawei.com>
(cherry picked from commit 91eff2bd0a5a861be51f26c55ad8092acdf25a40)
This commit is contained in:
liyunfei 2024-08-06 10:11:43 +08:00 committed by openeuler-sync-bot
parent e12a28876a
commit dab106ca0f
2 changed files with 10 additions and 7 deletions

View File

@ -26,11 +26,11 @@ index 0062126..8c16706 100755
+%_auto_set_build_flags 0 +%_auto_set_build_flags 0
+ +
+%__spec_build_pre %{___build_pre} \ +%__spec_build_pre %{___build_pre} \
+ %[%{_auto_set_build_cc} ? "%{set_build_cc}" : ""] \ + %[0%{?_auto_set_build_cc} ? "%{set_build_cc}" : ""] \
+ %[%{_auto_set_build_flags} ? "%{set_build_flags}" : ""] + %[0%{?_auto_set_build_flags} ? "%{set_build_flags}" : ""]
+%__spec_check_pre %{___build_pre} \ +%__spec_check_pre %{___build_pre} \
+ %[%{_auto_set_build_cc} ? "%{set_build_cc}" : ""] \ + %[0%{?_auto_set_build_cc} ? "%{set_build_cc}" : ""] \
+ %[%{_auto_set_build_flags} ? "%{set_build_flags}" : ""] + %[0%{?_auto_set_build_flags} ? "%{set_build_flags}" : ""]
+ +
#For backwards compatibility only. #For backwards compatibility only.
%__global_cflags %{build_cflags} %__global_cflags %{build_cflags}
@ -39,8 +39,8 @@ index 0062126..8c16706 100755
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\ [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\
mkdir -p `dirname "$RPM_BUILD_ROOT"`\ mkdir -p `dirname "$RPM_BUILD_ROOT"`\
mkdir "$RPM_BUILD_ROOT"\ mkdir "$RPM_BUILD_ROOT"\
+ %[%{_auto_set_build_cc} ? "%{set_build_cc}" : ""]\ + %[0%{?_auto_set_build_cc} ? "%{set_build_cc}" : ""]\
+ %[%{_auto_set_build_flags} ? "%{set_build_flags}" : ""]\ + %[0%{?_auto_set_build_flags} ? "%{set_build_flags}" : ""]\
%{nil} %{nil}
# ---- Expanded at end of %install scriptlet. # ---- Expanded at end of %install scriptlet.

View File

@ -3,7 +3,7 @@
Name: %{vendor}-rpm-config Name: %{vendor}-rpm-config
Version: 30 Version: 30
Release: 56 Release: 57
License: GPL+ License: GPL+
Summary: specific rpm configuration files Summary: specific rpm configuration files
URL: https://gitee.com/openeuler/openEuler-rpm-config URL: https://gitee.com/openeuler/openEuler-rpm-config
@ -150,6 +150,9 @@ sed -i "s/__vendor/%{vendor}/g" `grep "__vendor" -rl %{buildroot}%{_rpmconfigdir
%{rpmvdir}/find-requires.ksyms %{rpmvdir}/find-requires.ksyms
%changelog %changelog
* Tue Aug 6 2024 liyunfei <liyunfei33@huawei.com> - 30-57
- Fix for "%undefine _auto_set_build_XX" usage
* Mon Apr 29 2024 xujing <xujing125@huawei.com> - 30-56 * Mon Apr 29 2024 xujing <xujing125@huawei.com> - 30-56
- don't delete the commented code in macros - don't delete the commented code in macros