On 2015-08-04 19:46 +0200, Sven Joachim wrote:

> Package: bash
> Version: 4.3-13
> Severity: normal
> Tags: patch
>
> Bash is supposed to link with tinfo rather than ncurses:
>
> ,----
> | bash (4.2-1) unstable; urgency=low
> | 
> | [...]
> |   * Just link with libtinfo instead of libncurses if available.
> `----
>
> However, for some reason this does no longer work.  Looking at the build
> logs, starting with version 4.3-6 bash is linked with ncurses again.

I have looked into that now, and it turns out that the upstream patches
included in this and later 4.3 versions touch parse.y and y.tab.c which
is generated from parse.y.  Whether y.tab.c is newer than parse.y
depends on the order in which they are patched and the timestamp
resolution of the filesystem.  And, for reasons I still haven't figured
out, if y.tab.c and the files depending on it are rebuilt, bash is
linked with -lcurses.  Otherwise it gets linked with -ltinfo, for
instance in the 4.4~rc1-1 version in experimental.

> While I haven't been able to figure out the exact reason for that, just
> removing "--with-curses" from conf_args is sufficient to fix it, and you
> probably want to do that anyway.  See the attached (trivial) patch.

Would be nice to apply it, since bash is now the only essential package
depending on libncurses5.  And its dependencies should rather not depend
on the phase of the moon.

> diff -Nru bash-4.3/debian/rules bash-4.3/debian/rules
> --- bash-4.3/debian/rules     2015-01-28 17:55:12.000000000 +0100
> +++ bash-4.3/debian/rules     2015-08-04 17:11:56.000000000 +0200
> @@ -70,7 +70,6 @@
>                -lncurses)
>  
>  conf_args = \
> -     --with-curses \
>       --enable-largefile \
>       --prefix=/usr \
>       --infodir=/usr/share/info \

I have rebuilt bash 4.4~rc1-1 in unstable with and without this patch,
and the resulting binary packages are identical, which shows that
nothing changes if y.tab.c does not need to be rebuilt.

Cheers,
       Sven

Reply via email to