void-packages/srcpkgs/mairix/patches/issue5.patch
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

21 lines
685 B
Diff

From e9eb22f4cdebd7e262007d795fd3d0341dccc174 Mon Sep 17 00:00:00 2001
From: Kim Vandry <vandry@TZoNE.ORG>
Date: Mon, 14 Aug 2017 22:08:25 +0100
Subject: [PATCH] Fix another regression with nvp parsing introduced in 1305fc1
If we get two terminators in a row, don't carry out last_action twice.
Fixes vandry/mairix#5
--- a/nvp.c
+++ b/nvp.c
@@ -307,6 +307,9 @@ struct nvp *make_nvp(struct msg_src *src, char *s, const char *pfx)/*{{{*/
default:
break;
}
+ /* Clear last_action so we don't repeat the action if we
+ get another terminator immediately. */
+ last_action = GOT_NOTHING;
break;
case GOT_NOTHING: