If I have a macro defined globally as:
%{!?patch_file_list: %global patch_file_list %(pfl=$(mktemp -t); ls %{_topdir}/SOURCES/*.patch | sort > $pfl; echo $pfl)}
and use it in the %prep
section, is it assured that %{patch_file_list}
will contain the name of the file returned by mktemp -t
and the file will contain the list of patch files ?
When will the macro defined by %global patch_file_list ...
get expanded ?
when defined globally or when used first time in the %prep
section ?