[oe-commits] Richard Purdie : python: Add nativesdk wrapper to handle terminfo

git at git.openembedded.org git at git.openembedded.org
Tue Jun 18 16:26:40 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: 682861166f39fbdcd0c9b923139faab2d40362cf
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=682861166f39fbdcd0c9b923139faab2d40362cf

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Mon Jun 17 15:57:49 2013 +0100

python: Add nativesdk wrapper to handle terminfo

Currently if you build nativesdk-python, install it and try and run it,
you see it search in the default nativesdk path for terminfo files
when the readline module is used.

If terminfo files cannot be found, or if the ones found are incorrect,
the system may emit control characters which confuse commandline
processing.

This patch sets the TERMINFO_DIRS variable to ensure the correct locations
are searched for terminfo files, starting with the nativesdk terminfo files
and falling back to the host systtem's.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/python/python_2.7.3.bb |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 5150e52..59d189d 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -115,6 +115,10 @@ do_install() {
 	oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
 }
 
+do_install_append_class-nativesdk () {
+	create_wrapper ${D}${bindir}/python2.7 TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
 SSTATE_SCAN_FILES += "Makefile"
 PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
 



More information about the Openembedded-commits mailing list