void-packages/srcpkgs/quilt/patches/awk-portable-syntax.patch

46 lines
1.2 KiB
Diff

From ce9c68abb7cee0b4fb0d5a7ff7048d0ab3b726f8 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Thu, 23 Jun 2022 14:36:58 +0200
Subject: [PATCH] patchfns: Compatibility fix for BSD awk
"+" needs to be quoted to be considered as a literal "+" by BSD awk.
Without this fix, patch_header() fails to find the beginning of the
changes and treats the whole patch as a header, subsequently causing
"quilt refresh" to append the refreshed patch after the original one
instead of replacing it.
Bug reported and fix suggested by Dominic Evans.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 1d94980dbdd4 ("Tighten the patch format parsing")
---
quilt/scripts/patchfns.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
index 75cee52..c2d5f9d 100644
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -848,7 +848,7 @@ patch_header()
MAYBE_CONTEXT=0
}
MAYBE_UNIFIED {
- if (/^+++[ \t][^ \t]/)
+ if (/^\+\+\+[ \t][^ \t]/)
exit
print eaten
MAYBE_UNIFIED=0
@@ -881,7 +881,7 @@ patch_body()
MAYBE_CONTEXT=0
}
MAYBE_UNIFIED {
- if (/^+++[ \t][^ \t]/) {
+ if (/^\+\+\+[ \t][^ \t]/) {
print eaten
body=1
}
--
2.39.2