Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tic works differently than ncurses'. #19

Open
rofl0r opened this issue Nov 19, 2016 · 1 comment
Open

tic works differently than ncurses'. #19

rofl0r opened this issue Nov 19, 2016 · 1 comment

Comments

@rofl0r
Copy link
Member

rofl0r commented Nov 19, 2016

investigating this issue here: martanne/dvtm#42 and reading the manpage of our tic and ncurses tic (as well as studying the behaviour with strace) it turned out that there's a fundamental difference between the two.

  • ncurses tic, when called with a terminfo description file, will create a compiled terminfo description and move that into the systems terminfo directory (usually /usr/share/terminfo ).
    from the perspective of a packager, this behaviour is annoying since it circumvents the usual DESTDIR staging mechanisms when building a package for future use on several systems.
    packagers most likely did override this by manually setting the TERMINFO environment variable to the staging dir.
  • netbsd-curses tic just creates a CDB file of the terminfo description input file with the extension ".cdb" in the current directory.
    it is not installed into a system directory.
    in order to use such a compiled terminfo cdb file, it must be named either $(PREFIX)/share/terminfo.cdb or $(HOME)/.terminfo.cdb.

unlike ncurses, the terminfo database is not a directory structure, that means you can not add a single terminfo entry by moving it into some structure. if you want to add compiled terminfo descriptions, the entire terminfo.cdb file must be re-generated in a single call from a single input file. this may be inconvenient in the current situation that there are a small number of packages that ship their own terminfo descriptions and expect the ncurses behaviour from tic. a solution might be to ship a tool that can join several .cdb files into one, or to change the code in netbsd-curses to iterate over all cdb files found in a specific directory, or to ship all terminfo descriptions of said small number of packages as part of netbsd-curses (this might become unpractical if one or more of those packages tend to change their descriptions regularly).

@rofl0r
Copy link
Member Author

rofl0r commented Nov 19, 2016

it should be noted that in the past it seemed to be common practice that packages that required their own terminfo description tried to push them into the "global" terminfo database that is shipped together with ncurses. notable examples are screen, tmux, xterm, suckless terminal (st). so far the only known packages that don't are urxvt and dvtm.

rofl0r added a commit that referenced this issue Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant