]> code.ossystems Code Review - openembedded-core.git/commitdiff
python: Fix ptest not working problems
authorZhangle Yang <zhangle.yang@windriver.com>
Mon, 18 Nov 2013 12:54:55 +0000 (20:54 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Nov 2013 13:04:13 +0000 (13:04 +0000)
The run-ptest contained in python uses a Makefile. The path of the
Makefile is changed to ${libdir}/python/ptest in do_install_ptest.
However, the directory is wrong when the project is configured with
"--enable-multilib=lib32"

In addition, do_install_ptest is defined before "inherit ptest", so
it is overriden by the one in ptest.bbclass. do_install_ptest is
moved down.

Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python_2.7.3.bb

index 40d20f1f4fdfe1f8731f2368df96da94c47ef876..887e02e1c327f0195f88cd0a96f140e27c24faee 100644 (file)
@@ -134,11 +134,6 @@ 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'
 }
 
-do_install_ptest() {
-       cp ${B}/Makefile ${D}${PTEST_PATH}
-       sed -i s:LIBDIR:${libdir}:g ${D}${PTEST_PATH}/run-ptest
-}
-
 SSTATE_SCAN_FILES += "Makefile"
 PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
 
@@ -172,6 +167,14 @@ RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-misc"
 #inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
 inherit ptest
 
+# This must come after inherit ptest for the override to take effect
+do_install_ptest() {
+       cp ${B}/Makefile ${D}${PTEST_PATH}
+       sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
+        -e s:LIBDIR:${libdir}:g \
+        -i ${D}${PTEST_PATH}/run-ptest
+}
+
 # catch manpage
 PACKAGES += "${PN}-man"
 FILES_${PN}-man = "${datadir}/man"