Fix UpstreamBuilder deprecation warning (#461)

RPM build warnings:
        %patchN is deprecated (1 usages found), use %patch N (or %patch -P N)
This commit is contained in:
Jakub Kadlčík 2023-06-30 03:43:30 -04:00 committed by GitHub
parent deb8dd130a
commit 39449a8cc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -938,7 +938,7 @@ class UpstreamBuilder(NoTgzBuilder):
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):

View file

@ -44,7 +44,7 @@ class DistributionBuilder(UpstreamBuilder):
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