* [PATCH V2 0/2] ptest: add cleandirs flag and fix error on ubuntu host @ 2013-09-05 13:58 Qi.Chen 2013-09-05 13:58 ` [PATCH V2 1/2] ptest.bbclass: " Qi.Chen 2013-09-05 13:58 ` [PATCH V2 2/2] ptest.bbclass: add cleandirs flag to do_install_ptest_base Qi.Chen 0 siblings, 2 replies; 3+ messages in thread From: Qi.Chen @ 2013-09-05 13:58 UTC (permalink / raw) To: openembedded-core From: Chen Qi <Qi.Chen@windriver.com> The following changes since commit f41b7a7d4d0463a0dfafe6621d01680b81798019: bitbake: hob: remove PACKAGE_INSTALL variable setting from hob (2013-09-04 14:18:49 +0100) are available in the git repository at: git://git.pokylinux.org/poky-contrib ChenQi/ptest-dash http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/ptest-dash Chen Qi (2): ptest.bbclass: fix error on ubuntu host ptest.bbclass: add cleandirs flag to do_install_ptest_base meta/classes/ptest.bbclass | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH V2 1/2] ptest.bbclass: fix error on ubuntu host 2013-09-05 13:58 [PATCH V2 0/2] ptest: add cleandirs flag and fix error on ubuntu host Qi.Chen @ 2013-09-05 13:58 ` Qi.Chen 2013-09-05 13:58 ` [PATCH V2 2/2] ptest.bbclass: add cleandirs flag to do_install_ptest_base Qi.Chen 1 sibling, 0 replies; 3+ messages in thread From: Qi.Chen @ 2013-09-05 13:58 UTC (permalink / raw) To: openembedded-core From: Chen Qi <Qi.Chen@windriver.com> The do_install_ptest_base function uses 'type -t' command to check whether do_install_ptest is a function and acts correspondingly. However, the 'type' command is a shell builtin and its behavior is not all the same across Linux distros. On ubuntu, if we use #!/bin/sh as the interpreter for the scripts, as in the case of our intermediate scripts, the '-t' option for the 'type' command is not supported. So the check always fails and the do_install_ptest function, even if defined, is not run. The same problem also applies to the do_configure_ptest_base and the do_compile_ptest_base functions. This patch fixes this problem by avoiding using the 'type' builtin command. [YOCTO #5128] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- meta/classes/ptest.bbclass | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass index 37357e8..15a42d6 100644 --- a/meta/classes/ptest.bbclass +++ b/meta/classes/ptest.bbclass @@ -16,22 +16,30 @@ RDEPENDS_${PN}-ptest_virtclass-nativesdk = "" PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}" +do_configure_ptest() { + : +} + do_configure_ptest_base() { if [ ${PTEST_ENABLED} = 1 ]; then - if [ a$(type -t do_configure_ptest) = afunction ]; then - do_configure_ptest - fi + do_configure_ptest fi } +do_compile_ptest() { + : +} + do_compile_ptest_base() { if [ ${PTEST_ENABLED} = 1 ]; then - if [ a$(type -t do_compile_ptest) = afunction ]; then - do_compile_ptest - fi + do_compile_ptest fi } +do_install_ptest() { + : +} + do_install_ptest_base() { if [ ${PTEST_ENABLED} = 1 ]; then if [ -f ${WORKDIR}/run-ptest ]; then @@ -39,9 +47,7 @@ do_install_ptest_base() { if grep -q install-ptest: Makefile; then oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest fi - if [ a$(type -t do_install_ptest) = afunction ]; then - do_install_ptest - fi + do_install_ptest fi fi } -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH V2 2/2] ptest.bbclass: add cleandirs flag to do_install_ptest_base 2013-09-05 13:58 [PATCH V2 0/2] ptest: add cleandirs flag and fix error on ubuntu host Qi.Chen 2013-09-05 13:58 ` [PATCH V2 1/2] ptest.bbclass: " Qi.Chen @ 2013-09-05 13:58 ` Qi.Chen 1 sibling, 0 replies; 3+ messages in thread From: Qi.Chen @ 2013-09-05 13:58 UTC (permalink / raw) To: openembedded-core From: Chen Qi <Qi.Chen@windriver.com> The do_install_ptest_base task should have cleandirs flag, just like the do_install task. The ${D}${PTEST_PATH} directory should be cleaned, Otherwise, there would be similar errors like below if the do_install_ptest_base task is rerun. ln: failed to create symbolic link `xxx': File exists [YOCTO #5129] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- meta/classes/ptest.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass index 15a42d6..d67b4e6 100644 --- a/meta/classes/ptest.bbclass +++ b/meta/classes/ptest.bbclass @@ -52,6 +52,8 @@ do_install_ptest_base() { fi } +do_install_ptest_base[cleandirs] = "${D}${PTEST_PATH}" + addtask configure_ptest_base after do_configure before do_compile addtask compile_ptest_base after do_compile before do_install addtask install_ptest_base after do_install before do_package -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-05 13:57 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-05 13:58 [PATCH V2 0/2] ptest: add cleandirs flag and fix error on ubuntu host Qi.Chen 2013-09-05 13:58 ` [PATCH V2 1/2] ptest.bbclass: " Qi.Chen 2013-09-05 13:58 ` [PATCH V2 2/2] ptest.bbclass: add cleandirs flag to do_install_ptest_base Qi.Chen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox