On 2016-03-14 17:27 +0100, Sven Joachim wrote:

> On 2016-03-13 11:21 +0000, Niels Thykier wrote:
>
>> Thomas Dickey:
>>> On Sun, Mar 13, 2016 at 10:38:26AM +0100, Niels Thykier wrote:
>>>> Source: ncurses
>>>> Severity: wishlist
>>>> Tags: patch
>>>>
>>>> Hi,
>>>>
>>>> While working on the “reproducible builds” effort [1], we have noticed
>>>> that ncurses could not be built reproducibly.
>>>>
>>>> We have found that MKterminfo.sh included a trailing space in one
>>>> build test but not in the other.  It is not quite clear to me what
>>>> triggers this behaviour, but there is a note claiming it to be the
>>>> locale difference (one build is in C and the other in a French UTF-8
>>>> locale).
>>> 
>>> If it is a locale issue, then ensuring that the script uses
>>> POSIX locale will fix that.  The script does that already.
>>> 
>>> Perhaps the bug is not in ncurses, but in one of the tools used --
>>> some clarification would be helpful.
>>> 
>>
>> Hi,
>>
>> After digging a bit, it turns out that the difference is due to "dash vs
>> bash".  In one run /bin/sh is dash and the other it is bash (I think
>> $SHELL changes accordingly).
>>
>> However, I am not any wiser on why dash and bash disagrees on this.
>> Bash strips the whitespace and dash keeps it.
>
> That would be https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794965,
> it seems.  I'd rather see it fixed than paper over it in ncurses.

Looking at it again, there _is_ a small bug in ncurses, the trailing
space should not have been there in the first place.  It is in the
include/Caps* files and has been there forever (at least since ncurses
1.9.9g):

,---- [ include/Caps* ]
| #%Whenever possible, capnames are chosen to be the same as or similar to
| #%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses 
`----                                                                  ^^ note 
trailing space here

Running "sed -i -e 's/which uses $/which uses/' include/Caps*" fixes that.

Cheers,
       Sven

Reply via email to