Patchwork [2/2] ptest.bbclass: add cleandirs flag to do_install_ptest_base

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Sept. 5, 2013, 12:49 p.m.
Message ID <c2178953aaad8b6c2c14991af17eb6da9d0df2c9.1378385266.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/57461/
State Accepted
Commit 8d82eae8fd40fba8dac717af4cc317db766ab8e0
Headers show

Comments

Qi.Chen@windriver.com - Sept. 5, 2013, 12:49 p.m.
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(+)

Patch

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 71183af..188afcd 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -48,6 +48,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