Merge pull request #25 from rocky-linux/fix/deprecated_patch_format

Change patch directive to maximum compatible form
This commit is contained in:
Louis 2024-06-24 13:22:03 -07:00 committed by GitHub
commit c0794a01b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)
}