I recognized that RPM 5's %patch seems to not work. The "%patch"
definition in RPM 5's "macros" file actually seems to be fully broken to
me:
| %_patch_file %{P:%{-P:%{-P*}}%{!-P:%%PATCH0}}
| %_patch_suffix %{-b:-b --suffix %{-b*}}%{-z:--suffix %{-z*}}
|
| %__patch_display echo "Patch #%{-P:%{-P*}}%{!-P:0} (%{basename:%_patch_file}):"
| %__patch_apply %{uncompress:%_patch_file} | %{__patch} -s %{-p:-p%{-p*}} %{-F:-F%{-F*}} %{-d:-d%{-d*}} %_patch_suffix %{-R} %{-E}
|
| %patch(b:p:P:REz:F:d:) %{__patch_display} ; %{__patch_apply} \
| %{nil}
It accepts all options in %patch but because of indirections in the
expansions all the options are just lost. Example:
| $ ./rpm --eval '%patch -p123 -d foo -P4'
| error: File %PATCH0: No such file or directory
| echo "Patch #0 (%PATCH0):" ; /bin/cat %PATCH0 | /usr/opkg/bin/patch -s
Do I miss something? How is this supposed to work with the options?
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Sat Jul 21 23:38:09 2007