Skip to content
Commits on Source (3)
libzstd (1.3.8+dfsg-3) unstable; urgency=medium
* Add patch fixing zstdgrep exit code when operating on files
Closes: #918390, thanks to Jörg-Volker Peetz <jvpeetz@web.de>
-- Alexandre Mestiashvili <mestia@debian.org> Sat, 05 Jan 2019 23:42:20 +0100
libzstd (1.3.8+dfsg-2) unstable; urgency=medium
* Add patch skipping tests failing on GNU/Hurd when writing to special files
......
Description: Fix zstdgrep exit code when operating on files
From: Jörg-Volker Peetz <jvpeetz@web.de>
Forwarded: https://github.com/facebook/zstd/issues/1428
--- libzstd.orig/programs/zstdgrep
+++ libzstd/programs/zstdgrep
@@ -113,16 +113,11 @@
if [ "${silent}" -lt 1 ] && [ "$#" -gt 1 ]; then
grep_args="-H ${grep_args}"
fi
- CUR_EXIT_CODE=0
- EXIT_CODE=1
set -f
while [ "$#" -gt 0 ]; do
# shellcheck disable=SC2086
"${zcat}" -fq -- "$1" | "${grep}" --label="${1}" ${grep_args} -- "${pattern}" -
- CUR_EXIT_CODE=$?
- if [ "${CUR_EXIT_CODE}" -eq 0 ] && [ "${EXIT_CODE}" -ne 1 ]; then
- EXIT_CODE=0
- fi
+ [ "$?" -ne 0 ] && EXIT_CODE=1
shift
done
set +f
......@@ -3,3 +3,4 @@
0013-skip-memory-greedy-tests.patch
0014-Reproducible-build.patch
0015-Skip-dev-random-tests-on-hurd.patch
0016-fix-zstdgrep-exit-code.patch