On 18 Sep 2020, at 20:51, Sven Joachim <svenj...@gmx.de> wrote:
> 
> Control: reassign -1 cowdancer 0.88
> Control: retitle -1 cowdancer: needlessly links with ncurses
> Control: severity -1 important
> 
> On 2020-09-18 18:22 +0200, Sebastiaan Couwenberg wrote:
> 
>> Control: tags -1 - moreinfo
>> 
>> On 9/18/20 6:13 PM, Sven Joachim wrote:
>>> On 2020-09-18 16:55 +0200, Bas Couwenberg wrote:
>>>> Upgrading sid & experimental pbuilder chroots fails due to the new ncurses:
>>>> 
>>>> Preparing to unpack .../libncursesw6_6.2+20200912-1_amd64.deb ...
>>>> Unpacking libncursesw6:amd64 (6.2+20200912-1) over (6.2-1) ...
>>>> Preparing to unpack .../libncurses6_6.2+20200912-1_amd64.deb ...
>>>> Unpacking libncurses6:amd64 (6.2+20200912-1) over (6.2-1) ...
>>>> rm: /lib/x86_64-linux-gnu/libtinfo.so.6: version 
>>>> `NCURSES6_TINFO_6.2.current' not found (required by 
>>>> /lib/x86_64-linux-gnu/libncurses.so.6)
>>>> dpkg: error while cleaning up:
>>>>  rm command for cleanup subprocess returned error exit status 1
>>>> dpkg-split: /lib/x86_64-linux-gnu/libtinfo.so.6: version 
>>>> `NCURSES6_TINFO_6.2.current' not found (required by 
>>>> /lib/x86_64-linux-gnu/libncurses.so.6)
>>>> rm: /lib/x86_64-linux-gnu/libtinfo.so.6: version 
>>>> `NCURSES6_TINFO_6.2.current' not found (required by 
>>>> /lib/x86_64-linux-gnu/libncurses.so.6)
>>>> dpkg: error processing archive 
>>>> /var/cache/apt/archives/libtinfo6_6.2+20200912-1_amd64.deb (--unpack):
>>>>  rm command for cleanup subprocess returned error exit status 1
>>>> Errors were encountered while processing:
>>>>  /var/cache/apt/archives/libtinfo6_6.2+20200912-1_amd64.deb
>>>> E: Sub-process /usr/bin/dpkg returned an error code (1)
>>> 
>>> I cannot reproduce this, but my pbuilder chroots do not have libncurses6
>>> installed at all.
>> 
>> What about cowbuilder chroots?
> 
> Thanks for the hint, I do not use cowbuilder but had a look at the
> manpage where I found this option:
> 
> ,----
> |  --no-cowdancer-update
> |         Do  not use cowdancer on cowbuilder update. Please use this
> |         option when cowdancer is interfering with upgrade  process,
> |         or cowdancer itself is being upgraded within chroot.
> `----
> 
> Apparently this is what you need to use, for cowdancer seems to bring
> libncurses.so.6 into the address space of every binary on the system,
> which is "interfering with upgrade process".
> 
>>> What is this rm binary in your chroot, apparently it
>>> is linked to libncurses.so.6?
>> 
>> # which rm
>> /bin/rm
>> # dpkg -S /bin/rm
>> coreutils: /bin/rm
>> # ldd /bin/rm
>>         linux-vdso.so.1 (0x00007ffea75fb000)
>>         /usr/lib/cowdancer/libcowdancer.so (0x00007f2e6a6db000)
>>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2e6a512000)
>>         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2e6a50c000)
>>         libncurses.so.6 => /lib/x86_64-linux-gnu/libncurses.so.6
>> (0x00007f2e6a4e3000)
>>         libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6
>> (0x00007f2e6a4b4000)
>>         /lib64/ld-linux-x86-64.so.2 (0x00007f2e6a6f9000)
>> # aptitude why libncurses6
>> i   cowdancer Depends libncurses6 (>= 6)
> 
> It seems that cowdancer should not link with ncurses in the first place,
> as it only uses the tinfo library.  In fact, rebuilding cowbuilder with
> a current toolchain that defaults to the "--as-needed" linker flag
> causes cowbuilder and cowdancer to depend on libtinfo6 only.

Hm, that only defers the problem until libtinfo6 is similarly broken
mid-upgrade, no? It seems to me like dpkg has done a very dodgy
sequence of events that have resulted in the system being broken for a
short period and, whilst most don't notice, cowdancer does. Why is this
not a dpkg (or apt) bug? It should be possible to do that sequence in a
way that preserves the system as working, no?

But yes, there is the separate _minor_ issue that cowdancer is linking
against more than it needs to. I don't know why I made it pull in all
of ncurses, maybe an earlier version of the patch needed it and it no
longer does, but it's been too long to have any hope of remembering
what past me was thinking.

Jess

Reply via email to