bug-gnulib
[Top][All Lists]
Advanced

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

Re: FYI: do-release-commit-and-tag: fix typo


From: Stefano Lattarini
Subject: Re: FYI: do-release-commit-and-tag: fix typo
Date: Thu, 05 Jul 2012 17:49:54 +0200

On 07/05/2012 05:37 PM, Akim Demaille wrote:
> 
> Le 5 juil. 2012 à 17:13, Stefano Lattarini a écrit :
> 
>> Hi Akim, Jim.
> 
> hi Stefano,
> 
>> Just a minor correction about your "set -e" interpretation ...
>>
>> But "false && something" causes no problem under "set -e":
>>
>>    $ sh -e -c 'false && exit 1; echo OK'
>>    OK
>>
>> otherwise about one third of the Automake testsuite would spuriously
>> fail with regularity :-)
> 
> well, shells running the Automake test suite might be be a little
> more sane that are those running configure.
>
Actually, up to Automake 1.11.2 at least, the tests were unconditionally
run with /bin/sh -- even on Solaris 10, where that shell is hopelessly
brain-dead.

> But either my memory is deficient and this has never happened,
>
Actually, a 'false && exit 1' can still cause problems with some modern
shells (e.g., NetBSD 5.1 /bin/sh) if used as *last* command in a 'while'
or 'for' loop; in this case, the easiest workaround (employed by several
Automake tests) is to insert a ':' command at the end of the loop's body:

  while COND; do
     ...
     false && exit 1
     : For shells with busted "set -e".
  done

> or these are better days, and this constraint no longer makes sense.
>
In light of the observation above, it still makes sense, but is certainly
much less relevant and far-reaching than you though.

> In either case, thanks for my education!
> 
>> And I'm pretty sure that POSIX mandates this behaviour somewhere…
> 
> POSIX != portable.
> 

Best regards,
  Stefano



reply via email to

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