diff mbox

unexport TERMINFO to correct ncurses behavior

Message ID 1341941842-22303-1-git-send-email-ntl@pobox.com
State Accepted
Headers show

Commit Message

Nathan Lynch July 10, 2012, 5:37 p.m. UTC
The ncurses build can become polluted by the user's TERMINFO
environment variable, causing the user's ~/.terminfo to be modified
and preventing the install from succeeding:

/bin/sh ./run_tic.sh
** Building terminfo database, please wait...
Running tic to install /home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/share/emacs/24.0.97/etc/ ...

	You may see messages regarding extended capabilities, e.g., AX.
	These are extended terminal capabilities which are compiled
	using
		tic -x
	If you have ncurses 4.2 applications, you should read the INSTALL
	document, and install the terminfo without the -x option.

1562 entries written to /home/nathanl/.terminfo
** built new /home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/share/emacs/24.0.97/etc/
installing std
installing stdcrt
installing vt100
installing vt300
make[2]: Leaving directory `/home/nathanl/devel/buildroot.git/output/build/ncurses-5.7/misc'
make[1]: Leaving directory `/home/nathanl/devel/buildroot.git/output/build/ncurses-5.7'
for i in $(find /home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/lib* -name "*.la"); do cp -f $i $i~; /usr/bin/sed -i -e "s:\(['= ]\)/usr:\\1/home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr:g" $i; done
>>> ncurses 5.7 Installing to target
mkdir -p /home/nathanl/devel/buildroot.git/output/target/usr/lib
cp -dpf /home/nathanl/devel/buildroot.git/output/build/ncurses-5.7/lib/libncurses.so* /home/nathanl/devel/buildroot.git/output/target/usr/lib/
ln -snf /usr/share/terminfo /home/nathanl/devel/buildroot.git/output/target/usr/lib/terminfo
mkdir -p /home/nathanl/devel/buildroot.git/output/target/usr/share/terminfo/x
cp -dpf /home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/share/terminfo/x/xterm /home/nathanl/devel/buildroot.git/output/target/usr/share/terminfo/x
cp: cannot stat `/home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/share/terminfo/x/xterm': No such file or directory
make: *** [/home/nathanl/devel/buildroot.git/output/build/ncurses-5.7/.stamp_target_installed] Error 1

So unexport TERMINFO in the top-level Makefile.

Signed-off-by: Nathan Lynch <ntl@pobox.com>

---

Noticed this when building in emacs ansi-term.  The following
defconfig is enough to recreate it:

BR2_x86_i686=y
BR2_TOOLCHAIN_EXTERNAL=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_NCURSES=y

Verified that menuconfig still works; is there anything else I should
check?

 Makefile |    1 +
 1 file changed, 1 insertion(+)

Comments

Gustavo Zacarias March 24, 2013, 11:41 a.m. UTC | #1
On 07/10/2012 02:37 PM, Nathan Lynch wrote:

> Signed-off-by: Nathan Lynch <ntl@pobox.com>

Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Peter Korsgaard March 24, 2013, 1:34 p.m. UTC | #2
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> On 07/10/2012 02:37 PM, Nathan Lynch wrote:
 >> Signed-off-by: Nathan Lynch <ntl@pobox.com>

 Gustavo> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Committed, thanks.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index b80477f..6ec7a57 100644
--- a/Makefile
+++ b/Makefile
@@ -199,6 +199,7 @@  unexport CFLAGS
 unexport CXXFLAGS
 unexport GREP_OPTIONS
 unexport CONFIG_SITE
+unexport TERMINFO
 
 GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)