mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-12-04 18:36:26 +00:00
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:
parent
eba46f0fc7
commit
ced0546d71
@ -107,7 +107,7 @@ func sourcePatchOperationAfterLoop(req *sourcePatchOperationAfterLoopRequest) (b
|
|||||||
*req.newLines = append(*req.newLines, fmt.Sprintf("%s:%s%s", field, spaces, file.Name))
|
*req.newLines = append(*req.newLines, fmt.Sprintf("%s:%s%s", field, spaces, file.Name))
|
||||||
|
|
||||||
if req.expectedField == "Patch" && file.AddToPrep {
|
if req.expectedField == "Patch" && file.AddToPrep {
|
||||||
val := fmt.Sprintf("%%patch%d", fieldNum)
|
val := fmt.Sprintf("%%patch -P%d", fieldNum)
|
||||||
if file.NPath > 0 {
|
if file.NPath > 0 {
|
||||||
val = fmt.Sprintf("%s -p%d", val, file.NPath)
|
val = fmt.Sprintf("%s -p%d", val, file.NPath)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user