Change patch directive to maximum compatible form

The `%patchN` method of performing patches in `%prep` has long been
deprecated and should no longer be used. The form of `%patch -PN` is
preferred for maximum compatibility between all current and upcoming
EL releases.
This commit is contained in:
Louis Abel 2024-06-24 00:14:23 -07:00
parent eba46f0fc7
commit ced0546d71
Signed by: label
GPG Key ID: 3331F061D1D9990E

View File

@ -107,7 +107,7 @@ func sourcePatchOperationAfterLoop(req *sourcePatchOperationAfterLoopRequest) (b
*req.newLines = append(*req.newLines, fmt.Sprintf("%s:%s%s", field, spaces, file.Name))
if req.expectedField == "Patch" && file.AddToPrep {
val := fmt.Sprintf("%%patch%d", fieldNum)
val := fmt.Sprintf("%%patch -P%d", fieldNum)
if file.NPath > 0 {
val = fmt.Sprintf("%s -p%d", val, file.NPath)
}