Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36903 - libtermcap-compat-2.0.8 /etc/termcap file breaks app-editors/vi-3.7-r4
Summary: libtermcap-compat-2.0.8 /etc/termcap file breaks app-editors/vi-3.7-r4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-31 10:49 UTC by Paul Varner (RETIRED)
Modified: 2004-01-06 07:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to undo 004_all_termcap-xterm-X11R6.patch (termcap.patch.1,392 bytes, patch)
2004-01-02 19:46 UTC, Paul Varner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Varner (RETIRED) gentoo-dev 2003-12-31 10:49:35 UTC
After updating sys-libs/libtermcap-compat-1.2.3-r1 to sys-libs/libtermcap-compat-2.0.8, the vi command will no longer recoginize the terminal and will only run in "open mode"  Investigation of the problem, revealed that the cause is the new /etc/termcap file.  Replacing the file with the version from 1.2.3-r1 resolved the problem.

During troubleshooting I did the following:
1. emerge -v =sys-libs/libtermcap-compat-1.2.3-r1 to downgrade back to previous version.
2. ran vi junk - vi worked as expected
3. backed up /etc/termcap
4. emerge -v =sys-libs/libtermcap-compat-2.0.8
5. dispatch-conf to update /etc/termcap
6. ran vi junk - vi would only start in open mode
7. backed up /etc/termcap, replaced with previous version
8. ran vi junk - vi worked as expected
9. replaced /etc/termcap with newer version
10 emerge -v vi to re-emerge vi with newer libtermcap-compat
11. ran vi junk - vi would only start in open mode

For now I have downgraded back to 1.2.3-r1 and have masked 2.0.8 in my local package.mask

Reproducible: Always
Steps to Reproduce:
1. emerge app-editors/vi
2. if neccessary, emerge sys-libs/libtermcap-compat
3. export TERM=xterm
4. vi somefile

Actual Results:  
vi will start in "open mode"

Expected Results:  
vi will start in full screen mode using the capabilites of the terminal.

Portage 2.0.49-r18 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.20-gentoo-r9)
=================================================================
System uname: 2.4.20-gentoo-r9 i586 Pentium MMX
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium-mmx -pipe"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -march=pentium-mmx -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apm berkdb cdr crypt cups foomaticdb gdbm gpm gtk2 libwww mbox ncurses nls
pam pdflib perl ppds python readline samba sasl slang spell ssl svga tcpd usb
x86 xml2 zlib"
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-31 12:14:42 UTC
weird, I've been using vim since I've been testing this new libtermcap and it's been working ok -- but I'll look into this to see what I can figure out.
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-31 12:18:24 UTC
Aron, Ciaran, you guys are vi-heads -- what's your experience with this?
Comment 3 SpanKY gentoo-dev 2003-12-31 14:50:00 UTC
yeah, works for me ...
app-editors/vim-6.2-r5
sys-libs/libtermcap-compat-2.0.8

using Eterm, i run `vim <file>` and it works ... then i exporte TERM=xterm and try again and it works ...
Comment 4 Paul Varner (RETIRED) gentoo-dev 2003-12-31 15:37:25 UTC
Just a quick note, because the system in question is an older machine, I'm using the vi package and not the vim package.  I don't need the bloat from vim on that machine.
Comment 5 SpanKY gentoo-dev 2003-12-31 15:53:54 UTC
yep, i double checked with vi and when using TERM=xterm i get the same error ... but when using TERM=Eterm (cause you know, i use Eterm), it works fine
Comment 6 Paul Varner (RETIRED) gentoo-dev 2003-12-31 18:12:17 UTC
I obviously haven't tried everything, but every terminal type that I tried except xterm or xterm-24 worked correctly.  So apparently it is something with the xterm entry.  I've gone ahead and overidden the default TERM=xterm and set it to TERM=xterm-xfree86 which works just fine.
Comment 7 Seemant Kulleen (RETIRED) gentoo-dev 2004-01-02 12:43:22 UTC
An email from Andrew Minter:


Proposed solution: Drop 004_all_termcap-xterm-X11R6.patch from the ebuild.Explanation:The version of libterm used by vi only recognises a "tc=" entry at the *end* of a termcap definition, otherwise it ignores it.In the new /etc/termcap we have:v0|xterm|X11 terminal emulator:\        :tc=xterm-redhat:\        :kh=\EOH:ho=\E[1~:@7=\EOF:kH=\E[4~:which cause all the stuff in xterm-redhat to be ignored. This doesn't come from Eric's original file (he's infallible, you know) but from 004_all_termcap-xterm-X11R6.patch :--- termcap.orig        Thu Mar 22 17:19:03 2001+++ termcap     Thu Mar 22 17:17:41 2001@@ -1872,7 +1872,8 @@ # is widely used for a variety of incompatible terminal emulations including # color_xterm and rxvt. v0|xterm|X11 terminal emulator:\-       :tc=xterm-redhat:+       :tc=xterm-redhat:\+       :kh=\EOH:ho=\E[1~:@7=\EOF:kH=\E[4~: #       :tc=xterm-xfree86: #       :tc=xterm-r6:If you build the package without this patch everything works great.I'm copying Gunnar as he maintains the excellent vi sources.Hope this help.
Comment 8 Paul Varner (RETIRED) gentoo-dev 2004-01-02 19:32:10 UTC
I copied the ebuild over to my Portage Overlay, removed the 004_all_termcap-xterm-X11R6.patch, rebuilt the patch tar file and digests and re-emerged.  Everything worked correctly, so that definitely appears to be the problem.
Comment 9 Paul Varner (RETIRED) gentoo-dev 2004-01-02 19:46:00 UTC
Created attachment 23041 [details, diff]
Patch to undo 004_all_termcap-xterm-X11R6.patch

Here is the reverse patch for 004_all_termcap-xterm-X11R6.patch This way if
someone else runs into the bug before it is fixed, they can patch their
/etc/termcap to resolve the issue
Comment 10 Aron Griffis (RETIRED) gentoo-dev 2004-01-06 07:06:11 UTC
Seemant, you're going to go ahead and handle this, right..?  (Seeing as how you own the patches.)
Comment 11 Seemant Kulleen (RETIRED) gentoo-dev 2004-01-06 07:19:49 UTC
actually, vi-3.7-r5 reflects the latest vi release which is capable of handling the new termcap file, so I'm closing this bug