From 6e5db9212eab2a93e5b6dc0c442eb493718bebdf Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Thu, 29 Jun 2023 23:42:32 +0200 Subject: [PATCH] Fix UpstreamBuilder deprecation warning RPM build warnings: %patchN is deprecated (1 usages found), use %patch N (or %patch -P N) --- src/tito/builder/main.py | 2 +- src/tito/distributionbuilder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tito/builder/main.py b/src/tito/builder/main.py index cbfb8021..ffaa832b 100644 --- a/src/tito/builder/main.py +++ b/src/tito/builder/main.py @@ -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): diff --git a/src/tito/distributionbuilder.py b/src/tito/distributionbuilder.py index 27e9eb68..598fd563 100644 --- a/src/tito/distributionbuilder.py +++ b/src/tito/distributionbuilder.py @@ -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