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
- Fix cargo-deb terminfo installation The alacritty.terminfo file needs to be compiled by tic(1) before the ncurses/tinfo library can use it. Since cargo-deb does not support doing this at build time,... — committed to zwenna/alacritty by zwenna 5 years ago
- Fix cargo-deb terminfo installation The alacritty.terminfo file needs to be compiled by tic(1) before the ncurses/tinfo library can use it. Since cargo-deb does not support doing this at build time,... — committed to zwenna/alacritty by zwenna 5 years ago
- Remove terminfo from deb package Fixes #2685. — committed to roychoo/alacritty by Ckath 5 years ago
- Remove terminfo from deb package Fixes #2685. — committed to boxofrox/alacritty by Ckath 5 years ago
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 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:
prerm:
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.
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.
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.