Skip to content

Commit

Permalink
Fix UpstreamBuilder deprecation warning
Browse files Browse the repository at this point in the history
    RPM build warnings:
        %patchN is deprecated (1 usages found), use %patch N (or %patch -P N)
  • Loading branch information
FrostyX committed Jun 29, 2023
1 parent 863e4c7 commit 6e5db92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tito/builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def patch_upstream(self):
lines.insert(patch_insert_index, "Patch%s: %s\n" % (patch_number,
patch_filename))
if patch_apply_index > 0:
lines.insert(patch_apply_index, "%%patch%s -p1\n" % (patch_number))
lines.insert(patch_apply_index, "%%patch %s -p1\n" % (patch_number))
self._write_spec(lines)

def _write_spec(self, lines):
Expand Down
2 changes: 1 addition & 1 deletion src/tito/distributionbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def patch_upstream(self):

for patch in self.patch_files:
lines.insert(patch_insert_index, "Patch%s: %s\n" % (patch_number, patch))
lines.insert(patch_apply_index, "%%patch%s -p1\n" % (patch_number))
lines.insert(patch_apply_index, "%%patch %s -p1\n" % (patch_number))
patch_number += 1
patch_insert_index += 1
patch_apply_index += 2
Expand Down

0 comments on commit 6e5db92

Please sign in to comment.