NetBSD Problem Report #52593

From wiz@yt.nih.at  Wed Oct  4 10:42:19 2017
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A72067A17B
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  4 Oct 2017 10:42:19 +0000 (UTC)
Message-Id: <20171004104156.938582AC105@yt.nih.at>
Date: Wed,  4 Oct 2017 12:41:56 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
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
>Organization:
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
>Environment:
Architecture: x86_64
Machine: amd64
>Description:
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
terminfo(5):

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


>How-To-Repeat:
see above
>Fix:
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: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.