NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/52593: TERMINFO handling differences to Linux

>Number:         52593
>Category:       lib
>Synopsis:       TERMINFO handling differences to Linux
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 04 10:45:00 +0000 2017
>Originator:     Thomas Klausner
>Release:        NetBSD 8.99.3
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
Architecture: x86_64
Machine: amd64
Short version: On Linux, TERMINFO describes a directory,
while on NetBSD, it is interpreted as a file.

Long version:
mercurial comes with a self test that does:

$ mkdir "$TESTTMP/terminfo"
$ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti"
$ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --color=always -A

This does not work as intended on NetBSD.

Rewriting it as follows works:

$ mkdir "$TESTTMP/terminfo"
$ cp "$TESTDIR/hgterm.ti" "$TESTTMP/terminfo"
$ tic "$TESTTMP/terminfo/hgterm.ti"
$ TERM=hgterm TERMINFO="$TESTTMP/terminfo/hgterm.ti" hg status --config color.mode=terminfo --color=always -A

This looks like we should we change the NetBSD implementation of
the interpretation of the TERMINFO variable. On a Linux I see in

"If the environment variable TERMINFO is set, it is interpreted as the
pathname of a directory containing the compiled description you are
working on. Only that directory is searched."

While NetBSD's terminfo(5) says

"If the environment variable TERMINFO is available, does not begin with
(â??/â??), can be compiled with the above rules and ..."

see above
Interpret TERMINFO as a directory name instead.

Home | Main Index | Thread Index | Old Index