GNU bug report logs -
#29266
gzip-1.8.41 test results: help-version
Previous Next
Reported by: Bruno Haible <bruno <at> clisp.org>
Date: Sat, 11 Nov 2017 23:41:02 UTC
Severity: normal
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 29266 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Bruno Haible wrote:
> ! # Produce output and exit with code 1 if there is a write error.
> ! # Use 'exec echo', not plain 'echo', because the 'echo' built-in in
> ! # HP-UX /bin/sh does not check for write errors.
> ! # Use '|| exit 1', because the 'echo' program on HP-UX exits with
> ! # code 2 in case of a write error, but we want code 1.
> ! --help) (exec echo "$usage") || exit 1; exit 0;;
> ! --version) (exec echo "$version") || exit 1; exit 0;;
Thanks for the patch. I don't think we need worry about the first problem, since
gzip assumes a working POSIX shell and the first problem is a failure to conform
to POSIX. We can ask builders on HP-UX to work around the problem by configuring
with SHELL=/bin/bash, or with some other POSIX-compatible shell.
The second problem is indeed a bug in gzip, since it shouldn't assume that echo
exits with status 1 on failure (it could be some other positive status).
I notice that some gzip scripts already fix that bug, and some other scripts do
not fix it. Also, while we're at it, scripts should use printf instead of echo
if the strings might contain backslash (at least in theory; admittedly a
backslash in a version number would be pretty weird). I looked for these
problems in all the scripts and installed the attached to fix what I found.
[0001-maint-script-diagnostics-status-cleanup.txt (text/plain, attachment)]
This bug report was last modified 7 years and 268 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.