OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002942 [mutt] upgrade minor always 2008-11-13 14:51 2008-11-24 23:24
Reporter skayser View Status public  
Assigned To phil
Priority normal Resolution fixed  
Status closed  
Summary 0002942: Broken TERM=xterm terminal handling with 1.5.18,REV=2008.11.03?
Description We just upgraded to the most recent unstable/ package yesterday. That seems to have broken the terminal handling for mutt and TERM=xterm somehow.

When i hit an unbound key on the index page, the error message "Key is not bound. Press '?' for help." is not displayed at the bottom of the terminal, but on the same line that i am positioned on. When i then hit another key (for example "k" to move up), everything beneath the line i had been sitting on is cleared out.

The same thing happens, when i am positioned on the first message and try to move upwards. The error message "You are on the first message" is displayed on the current line (i.e. not at the bottom of the terminal) and everything below is cleared out.
Additional Information $ uname -a
SunOS ray2 5.10 Generic_137112-07 i86pc i386 i86pc

$ pkginfo -l CSWmutt
   PKGINST: CSWmutt
      NAME: mutt - A small but very powerful text-based mail client
  CATEGORY: application
      ARCH: i386
   VERSION: 1.5.18,REV=2008.11.03
   BASEDIR: /
    VENDOR: http://www.mutt.org/download.html [^] packages for CSW by Philip Brown
    PSTAMP: build8x20081104162455
  INSTDATE: Nov 12 2008 15:23
   HOTLINE: http://www.opencsw.org/bugtrack/ [^]
     EMAIL: phil@opencsw.org
    STATUS: completely installed
     FILES: 176 installed pathnames
                  66 shared pathnames
                  69 directories
                   6 executables
               12792 blocks used (approx)

$ ldd $( which mutt )
        libncurses.so.5 => /opt/csw/lib/i386/libncurses.so.5
        libssl.so.0.9.8 => /opt/csw/lib/pentium_pro/libssl.so.0.9.8
        libcrypto.so.0.9.8 => /opt/csw/lib/pentium_pro/libcrypto.so.0.9.8
        libz.so => /opt/csw/lib/i386/libz.so
        libintl.so.3 => /opt/csw/lib/i386/libintl.so.3
        libgpgme.so.11 => /opt/csw/lib/i386/libgpgme.so.11
        libgpg-error.so.0 => /opt/csw/lib/i386/libgpg-error.so.0
        libnsl.so.1 => /lib/libnsl.so.1
        libidn.so.11 => /opt/csw/lib/i386/libidn.so.11
        libsocket.so.1 => /lib/libsocket.so.1
        libiconv.so.2 => /opt/csw/lib/i386/libiconv.so.2
        libc.so.1 => /lib/libc.so.1
        libdl.so.1 => /lib/libdl.so.1
        libmp.so.2 => /lib/libmp.so.2
        libmd.so.1 => /lib/libmd.so.1
        libscf.so.1 => /lib/libscf.so.1
        libdoor.so.1 => /lib/libdoor.so.1
        libuutil.so.1 => /lib/libuutil.so.1
        libgen.so.1 => /lib/libgen.so.1
        libm.so.2 => /lib/libm.so.2

$ pkginfo -l CSWncurses
   PKGINST: CSWncurses
      NAME: ncurses - ncurses library and utilities
  CATEGORY: application
      ARCH: i386
   VERSION: 5.5,REV=2006.02.10
   BASEDIR: /
    VENDOR: http://ftp.gnu.org/pub/gnu/ncurses [^] packaged for CSW by Andreas Almroth
    PSTAMP: thor20060209235656
  INSTDATE: Aug 28 2008 14:11
   HOTLINE: http://www.blastwave.org/bugtrack/ [^]
     EMAIL: aalmroth@blastwave.org
    STATUS: completely installed
     FILES: 3268 installed pathnames
                   9 shared pathnames
                1001 linked files
                  54 directories
                   8 executables
               29221 blocks used (approx)
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0005392)
philadmin (viewer)
2008-11-13 22:18

Hmm.. perhaps ncurses and "xterm" termcap, do not mix properly now, for some odd reason?

it seems to work ok if I sent TERM=vt100.

other thoughts?
(0005400)
skayser (administrator)
2008-11-14 16:24

Mhh, thats what i thought also, but the xterm terminfo that is loaded by mutt is part of CSWncurses and CSWncurses has not been upgraded.

# truss -topen -o /path/to/tmp/file -f mutt
...
open64("/opt/csw/share/terminfo/x/xterm", O_RDONLY) = 3
...

Maybe the new mutt version uses some xterm terminfo control sequences (maybe via ncurses) that have not been used before, and that don't go along with the Solaris xterm ... which would be a mismatch between the Solaris xterm and the CSWncurses provided xterm terminfo.
(0005422)
skayser (administrator)
2008-11-24 21:06

Another thing i just realized: mutt from stable/ uses slang, whereas mutt from current/ uses ncurses. The former works just fine with Solaris xterm, the latter shows the faulty behaviour described in the inital problem description.

So it seems that the Solaris xterm implementation copes badly with some terminal capabilities that are used by ncurses (give "truss -twrite -w1 -o outfile mutt" a try, in case you want to see some details; the control sequences are quite different).

A search on sunsolve.sun.com turned up the following bug report that describes a similar problem.

Bug ID: 6569261
xterm, xtermc, xterm-color: smcup/rmcup definitions are incorrect/missing
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6569261 [^]

Unfortunately the described workaround does not solve the mutt problem. However, while trying out the workaround i noticed that the Solaris provided xterm terminfo description file (i.e. NOT the CSWncurses one) works just fine with CSWmutt.

TERMINFO=/usr/share/lib/terminfo /opt/csw/bin/mutt

The description file misses some features (colors won't work), but i think it supports the idea that the terminfo file provided with CSWncurses contains or defines xterm capabilities in a way which Solaris xterm does not properly support.
(0005423)
skayser (administrator)
2008-11-24 21:50

Singled out the positioning control sequence that doesn't work: \E[24d (capability name: vpa). It should be doing absolute line positioning and can be seen in the truss output just before mutt wants to print a message to the status bar.

However, if you echo the escape sequence manually, you can see that Solaris xterm doesn't implement it.

$ echo -ne '\E[24d'

To fix this, just remove the vpa capability from the terminfo file. From within a xterm do the following:

1. mkdir $HOME/terminfo
2. TERMINFO=/opt/csw/share/terminfo infocmp -1 > xterm.src
3. Edit xterm.src and delete the line with vpa=
4. TERMINFO=$HOME/terminfo tic xterm.src
5. TERMINFO=$HOME/terminfo mutt

Now mutt (or rather ncurses) uses '\E[23B' (23 rows down, capability name: cud) for positioning and that works.

Would be a patch for CSWncurses then i guess.
(0005427)
philadmin (viewer)
2008-11-24 23:24

forced to use slrn. turns out, old working version did that as well.
issue fixed, and new package uploaded.


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker