Pass the path of the patch in the command line instead of as stdin.

This way, we can see the applied patch in the log.
This commit is contained in:
Matthieu Gautier 2022-11-15 18:17:46 +01:00
parent a7809b33fc
commit b8c120b179
1 changed files with 3 additions and 2 deletions

View File

@ -70,8 +70,9 @@ class Source:
def _patch(self, context): def _patch(self, context):
context.try_skip(self.source_path) context.try_skip(self.source_path)
for p in self.patches: for p in self.patches:
with open(pj(SCRIPT_DIR, 'patches', p), 'r') as patch_input: patch_file_path = pj(SCRIPT_DIR, 'patches', p)
run_command("patch -p1", self.source_path, context, input=patch_input.read()) patch_command = "patch -p1 -i {patch}".format(patch=patch_file_path)
run_command(patch_command, self.source_path, context)
def command(self, name, function, *args): def command(self, name, function, *args):
print(" {} {} : ".format(name, self.name), end="", flush=True) print(" {} {} : ".format(name, self.name), end="", flush=True)