After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774070 - [PATCH] Try both terminfo and termcap names when running tput
[PATCH] Try both terminfo and termcap names when running tput
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other FreeBSD
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2016-11-07 17:47 UTC by Ting-Wei Lan
Modified: 2016-11-09 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
terminal: Try both terminfo and termcap names when running tput (2.77 KB, patch)
2016-11-07 17:48 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-11-07 17:47:45 UTC
JHBuild cannot print bold text on FreeBSD because 'tput bold' command always fails. The attached patch fixes it by trying both 'tput bold' (terminfo name) and 'tput md' (termcap name). It also fixes t_reset and t_colour.
Comment 1 Ting-Wei Lan 2016-11-07 17:48:51 UTC
Created attachment 339265 [details] [review]
terminal: Try both terminfo and termcap names when running tput

FreeBSD doesn't have a terminfo database, and its tput command only
support termcap names. To make bold text works on more systems, we try
both terminfo and tercap names before giving up and using normal text.

This commit also adds terminfo 'setaf' as an alternative to 'setf'
because it seems that the latter only works with xterm, not with other
popular terminals such as xterm-256color and screen.
Comment 2 Michael Catanzaro 2016-11-08 14:34:04 UTC
Review of attachment 339265 [details] [review]:

OK
Comment 3 Ting-Wei Lan 2016-11-09 13:55:49 UTC
Attachment 339265 [details] pushed as 9ea2b62 - terminal: Try both terminfo and termcap names when running tput