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