From 4657132716a94fe48a3dcd3427ebf5c46f04569f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Tue, 11 Apr 2023 19:11:49 +0300 Subject: [PATCH] Fix tix-port(8) diffs on non-English locales. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tix-port(8) parses the diff(1) output, to remove the "Only in …" informational messages. As they are meant to be human-readable, not machine-readable, they are translated to different languages, which causes tix-port(8) to miss them. This patch sets LC_ALL=C for the diff invocation, so that the messages are always in English. --- tix/tix-port | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tix/tix-port b/tix/tix-port index 28e406c1..256f6040 100755 --- a/tix/tix-port +++ b/tix/tix-port @@ -317,7 +317,7 @@ diff_package() {( base=$(basename -- "$port") if [ -e "$base.upstream" ]; then announce "diff $base.upstream $base" - diff -Paur --no-dereference -- "$base.upstream" "$base" | + LC_ALL=C diff -Paur --no-dereference -- "$base.upstream" "$base" | sed -E -e '/^Only in.*$/d' -e 's/^((---|\+\+\+)[^\t]+)\t.*/\1/' \ > "$base.patch" if [ ! -s "$base.patch" ]; then rm "$base.patch"; fi