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"
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.
Aron, Ciaran, you guys are vi-heads -- what's your experience with this?
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 ...
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.
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
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.
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.
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.
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
Seemant, you're going to go ahead and handle this, right..? (Seeing as how you own the patches.)
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