alacritty: Cargo-deb installation conflicts with ncurses-term package

Environment

Debian testing (11 / bullseye) with X11.

Issue

Apparently the latest version of ncurses-term (6.1+20190713-1) packages its own version of alacritty’s terminfo, which conflicts with the same file that alacritty tries to install:

$ cargo deb --install --manifest-path alacritty/Cargo.toml
...
Preparing to unpack .../alacritty_0.3.3_amd64.deb ...
Unpacking alacritty (0.3.3) ...
dpkg: error processing archive /home/rlue/tmp/alacritty/target/debian/alacritty_0.3.3_amd64.deb (--install):
 trying to overwrite '/usr/share/terminfo/a/alacritty', which is also in package ncurses-term 6.1+20190713-1
Processing triggers for mime-support (3.62) ...
Errors were encountered while processing:
 /home/rlue/tmp/alacritty/target/debian/alacritty_0.3.3_amd64.deb
cargo-deb: installation failed, because dpkg -i returned error

Now that I think about it, perhaps this should be considered a bug on ncurses-term’s part… Or perhaps ncurses-term could be listed as a dependency of alacritty’s generated .deb package (provided the contents of the terminfo file are never expected to change)?

At the very least, I wanted to submit this issue so there’s a record of what to do when someone else runs into the same problem.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 8
  • Comments: 24 (7 by maintainers)

Commits related to this issue

Most upvoted comments

The alacritty terminfo entries have only been added a few days ago in Debian’s and Ubuntu’s development versions, it will take a while until they reach the wide public in stable releases (Ubuntu 20.04 and Debian 11). So maybe Alacritty’s .deb could continue to include these files, but move them under /lib/terminfo where they do not clash with ncurses-term?

Especially since Debian 10 has been released just recently and even 20.04 is still a bit of time away, this is a very good point. Though as mentioned previously I’d have to setup a Debian VM to test what the best solution would be. On Arch /lib/terminfo is symlinked to /usr/share/terminfo, so it wouldn’t work, however if this is not the case on Debian and it’s still loaded, that would be a great option.

On Debian and derivatives, /lib/terminfo will most likely never be a symlink to /usr/share/terminfo (unless the local admin has made one, and then they keep the pieces).

I think we can just execute tic in the extra/linux/debian/positinst script, however we’d still have to first copy it somewhere.

I had thought of running tic at package build time, but that does not seem possible with cargo-deb. So you would probably have to include alacritty.info in the .deb, say in /usr/share/alacritty, and then use maintainerscripts like these (untested):

postinst:

#!/bin/sh
set -e
tic -x -o /lib/terminfo /usr/share/alacritty/alacritty.info

prerm:

#!/bin/sh
set -e
rm -f /lib/terminfo/alacritty /lib/terminfo/alacritty+common /lib/terminfo/alacritty-direct

First of all, thanks for reporting this issue. Alacritty’s terminfo file has been added to ncurses relatively recently, which is why it was provided with Alacritty until now. Since ncurses did not make an actual release yet, it was not clearly transparent at which point Debian and Ubuntu would update to it.

FWIW I’ve filed a corresponding issue on the ncurses-term Debian package.

Please note for future reference, that it’s probably a better idea to report things in one place first before creating multiple issues. This is not something where Debian can do much, so it just generates a bit of unnecessary noise and work upstream. Checking here first should be a good way to keep that down, I can usually respond to issues within a day.

Now that I think about it, perhaps this should be considered a bug on ncurses-term’s part… Or perhaps ncurses-term could be listed as a dependency of alacritty’s generated .deb package (provided the contents of the terminfo file are never expected to change)?

This is not a bug of ncurses-term. Alacritty’s .deb is not an official Debian package, but only built by Alacritty’s CI. So there’s no way for Debian maintainers to know anything about it. So this is something where Alacritty’s .deb file needs to be adjusted.

Adding ncurses-term as a dependency without packaging the terminfo files in the .deb file is likely a good idea.

I have this problem today using PPA release. Reopen ?

I have taken the time to write a patch that should do the trick. However I will not send a pull request, since I have no way to test it.