mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] git-ptx-patches: consume complete output of man
@ 2018-03-21 10:20 Uwe Kleine-König
  0 siblings, 0 replies; only message in thread
From: Uwe Kleine-König @ 2018-03-21 10:20 UTC (permalink / raw)
  To: ptxdist

On Debian unstable/testing man doesn't like it's stdout being closed
prematurely:

	$ man git-format-patch | grep -q -e --notes
	Bad system call (core dumped)
	man: command exited with status 159: /usr/lib/man-db/zsoelim | /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE | preconv -e UTF-8 | tbl | nroff -mandoc -Tutf8

This clutters the output of git ptx-patches which is annoying.

While this is a bug of man(1), it is easy enough to work around by not
using grep -q.

Bug-Debian: https://bugs.debian.org/892309
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

not sure it is really necessary to work around this problem given that
the bug is fixed soon in Debian and is also fixed upstream. But as I
already implemented the patch and only found the bug while thinking what
to write in the commit log, I send it anyhow and let you decide if you
want the patch or not.

Best regards
Uwe

 scripts/git-ptx-patches | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches
index cdecd799a657..66cefb62c07c 100755
--- a/scripts/git-ptx-patches
+++ b/scripts/git-ptx-patches
@@ -122,7 +122,7 @@ fi
 
 # git-format-patch --notes is supported since git 1.7.6, but actually you want
 # git 1.8.1-rc0 to get the notes below the --- marker
-if man git-format-patch | grep -q -e --notes; then
+if man git-format-patch | grep -e --notes > /dev/null; then
 	GIT_EXTRA_ARGS="$GIT_EXTRA_ARGS --notes"
 fi
 
-- 
2.16.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-21 10:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 10:20 [ptxdist] [PATCH] git-ptx-patches: consume complete output of man Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox