bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29266: gzip-1.8.41 test results: help-version on HP-UX


From: Paul Eggert
Subject: bug#29266: gzip-1.8.41 test results: help-version on HP-UX
Date: Sun, 12 Nov 2017 23:53:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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.

Attachment: 0001-maint-script-diagnostics-status-cleanup.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]