NetBSD Problem Report #52593

From  Wed Oct  4 10:42:19 2017
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id A72067A17B
	for <>; Wed,  4 Oct 2017 10:42:19 +0000 (UTC)
Message-Id: <>
Date: Wed,  4 Oct 2017 12:41:56 +0200 (CEST)
From: Thomas Klausner <>
Reply-To: Thomas Klausner <>
Subject: TERMINFO handling differences to Linux
X-Send-Pr-Version: 3.95

>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.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.