NetBSD Problem Report #50344

From sfisher@panix.com  Sun Oct 18 21:56:01 2015
Return-Path: <sfisher@panix.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7422FA567D
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 18 Oct 2015 21:56:01 +0000 (UTC)
Message-Id: <20151018215558.12401781AE0@shadow.localdomain>
Date: Sun, 18 Oct 2015 15:55:58 -0600 (MDT)
From: sfisher@panix.com
Reply-To: sfisher@panix.com
To: gnats-bugs@NetBSD.org
Subject: apropos shows formatting on console with vt100 term type
X-Send-Pr-Version: 3.95

>Number:         50344
>Category:       bin
>Synopsis:       apropos shows formatting on console with vt100 term type
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    joerg
>State:          closed
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 18 22:00:00 +0000 2015
>Closed-Date:    Tue Nov 24 18:18:33 +0000 2015
>Last-Modified:  Fri Apr 15 07:50:00 +0000 2016
>Originator:     Stephen Fisher
>Release:        NetBSD 7.0
>Organization:
>Environment:
System: NetBSD shadow 7.0 NetBSD 7.0 (GENERIC.201509250726Z) amd64
Architecture: x86_64
Machine: amd64
>Description:
When you type apropos <text> (or man -k <text>) on the console (which is
set by default to vt100 in /etc/ttys), extra characters (formatting?) appear
around the colored parts.  For example: "$<2>options$<2> ($<2>4$<2>)" instead
of "options (4)" 
>How-To-Repeat:
Login from the console, which is set to vt100 in /etc/ttys instead of one
of the other local consoles (such as ttyE1 or ttyE2) which are set to wsvt25.
Setting the TERM environment variable to wsvt25 while on the console solves
the display problem for that session. 
>Fix:
I'm not sure if the proper fix is to set console to wsvt25 in /etc/ttys or
something else.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-amd64-maintainer->joerg
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Mon, 19 Oct 2015 07:19:47 +0000
Responsible-Changed-Why:
Joerg, can you please look at it?


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/50344: apropos shows formatting on console with vt100 term type
Date: Mon, 19 Oct 2015 09:21:58 +0200

 If you do not use serial console, replacing vt100 with wsvt25 in /etc/ttys
 is fine.

 However, apropos should not emit colour sequences when the terminal does
 not support them (and I seem to recall this has been fixed already, maybe
 there is just a pullup to -7 missing).

 Martin

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/50344: apropos shows formatting on console with vt100 term
 type
Date: Mon, 19 Oct 2015 16:14:14 +0300

 On Mon, Oct 19, 2015 at 07:25:01 +0000, Martin Husemann wrote:

 > However, apropos should not emit colour sequences when the terminal
 > does not support them (and I seem to recall this has been fixed
 > already, maybe there is just a pullup to -7 missing).

 vt100 terminfo description does have smul/rmul (underlining) sequences
 defined, but they include delays "$<2>", which is what you see.

      A delay in milliseconds may appear anywhere in a string
      capability, prefixed with a dollar sign and enclosed by angled
      brackets, such as $<5>.

 So the problem is that apropos doesn't use terminfo correctly.

 -uwe

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50344 CVS commit: src/usr.sbin/makemandb
Date: Mon, 23 Nov 2015 17:34:00 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Mon Nov 23 22:34:00 UTC 2015

 Modified Files:
 	src/usr.sbin/makemandb: apropos-utils.c

 Log Message:
 PR/50344: Stephen Fisher: apropos shows formatting on console with vt100 term
 type. Can't print terminfo sequences directly; need to process them with
 ti_puts() to handle padding. This removes the padding delays, and stricly
 could break on slow terminal hardware, but they way the code is structured
 makes it impossible to fix properly (since the formatting strings are
 passed in the query).
 XXX: pullup-7


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/makemandb/apropos-utils.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Tue, 24 Nov 2015 13:18:33 -0500
State-Changed-Why:
fixed


From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50344 CVS commit: [netbsd-7] src/usr.sbin/makemandb
Date: Fri, 15 Apr 2016 07:47:30 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri Apr 15 07:47:30 UTC 2016

 Modified Files:
 	src/usr.sbin/makemandb [netbsd-7]: apropos-utils.c

 Log Message:
 Pull up following revision(s) (requested by christos in ticket #1142):
 	usr.sbin/makemandb/apropos-utils.c: revisions 1.18, 1.19
 CID 1341551: Don't bother formatting if ti == NULL
 --
 PR/50344: Stephen Fisher: apropos shows formatting on console with vt100 term
 type. Can't print terminfo sequences directly; need to process them with
 ti_puts() to handle padding. This removes the padding delays, and stricly
 could break on slow terminal hardware, but they way the code is structured
 makes it impossible to fix properly (since the formatting strings are
 passed in the query).


 To generate a diff of this commit:
 cvs rdiff -u -r1.16 -r1.16.2.1 src/usr.sbin/makemandb/apropos-utils.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

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.