Move package note generation to build preamble
We would try to regenerate the file whenever set_build_flags was used. For packages which call %configure multiple times this would mean a few times during build, and also in the build and check preambles. Let's just simplify this and call it only in the build preamble. https://src.fedoraproject.org/rpms/package-notes/pull-request/1 changes %_generate_package_note_file to be unconditional. This means we'll always rewrite the file and will not use a stale version. (But the two fixes are independent, even though they make the most sense together.)
This commit is contained in:
parent
30e7d26cb4
commit
ce70218eed
6
macros
6
macros
@ -80,7 +80,6 @@
|
|||||||
# been set implicitly at the start of the %%build section.
|
# been set implicitly at the start of the %%build section.
|
||||||
# LT_SYS_LIBRARY_PATH is used by libtool script.
|
# LT_SYS_LIBRARY_PATH is used by libtool script.
|
||||||
%set_build_flags \
|
%set_build_flags \
|
||||||
%{?_generate_package_note_file:%{_generate_package_note_file} ; } \
|
|
||||||
CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \
|
CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \
|
||||||
CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \
|
CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \
|
||||||
FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \
|
FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \
|
||||||
@ -94,7 +93,10 @@
|
|||||||
# install phases.
|
# install phases.
|
||||||
# Use "%undefine _auto_set_build_flags" to disable"
|
# Use "%undefine _auto_set_build_flags" to disable"
|
||||||
%_auto_set_build_flags 1
|
%_auto_set_build_flags 1
|
||||||
%__spec_build_pre %{___build_pre} %{?_auto_set_build_flags:%{set_build_flags}}
|
%__spec_build_pre %{___build_pre} \
|
||||||
|
%{?_auto_set_build_flags:%{set_build_flags}} \
|
||||||
|
%{?_generate_package_note_file}
|
||||||
|
|
||||||
%__spec_check_pre %{___build_pre} %{?_auto_set_build_flags:%{set_build_flags}}
|
%__spec_check_pre %{___build_pre} %{?_auto_set_build_flags:%{set_build_flags}}
|
||||||
|
|
||||||
# Internal-only. Do not use. Expand a variable and strip the flags
|
# Internal-only. Do not use. Expand a variable and strip the flags
|
||||||
|
Loading…
Reference in New Issue
Block a user