control: tags -1 patch

On 2018-12-17 13:24:50 [+0100], Étienne Mollier wrote:
> I will keep the modification in my /usr/bin/xzcmp for some time,
> in case it inadvertently breaks things.

made a patch.

> Cheers

Sebastian
From: Sebastian Andrzej Siewior <[email protected]>
Date: Thu, 24 Dec 2020 20:56:15 +0100
Subject: [PATCH] xzdiff: Trap SIGPIPE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The `cmp' command will return early if a difference is found while the
shell script is still invoking the decompressor which writes into the
closed FD. This results in SIGPIPE / exit code 141.
By ignoring SIGPIPE the real return code from `cmp' is observed which is
`1' and xzdiff exits with `1'. Without ignoring SIGPIPE the exitcode 141
is observed and xzdiff returns with `2'.

Reported to Debian BTS as #844770. Change suggested by Étienne Mollierö.

BTS: https://bugs.debian.org/844770

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
 src/scripts/xzdiff.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/scripts/xzdiff.in b/src/scripts/xzdiff.in
index eb7825c1dfba9..d343a889e0e52 100644
--- a/src/scripts/xzdiff.in
+++ b/src/scripts/xzdiff.in
@@ -1,4 +1,5 @@
 #!@POSIX_SHELL@
+trap '' PIPE
 
 # Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
 # Copyright (C) 1993 Jean-loup Gailly
-- 
2.29.2

Reply via email to