[1/1] classes/externalsrc: delete symlinks at start of do_buildclean

Submitted by Paul Eggleton on Sept. 18, 2017, 4:54 a.m. | Patch ID: 144264


Message ID 15886a7f2dfdc6d98f502528101db60eb9a4d9a6.1505710457.git.paul.eggleton@linux.intel.com
State Master Next
Commit 927b3b05a7f6b85967f7375b1942605fe8d37d0c
Headers show

Commit Message

Paul Eggleton Sept. 18, 2017, 4:54 a.m.
To help users find the work and log directories (especially within the
eSDK) we create symlinks to these from the source tree. However during
do_buildclean we call "make clean", and some project Makefiles which
delete something like "*/*/lib" which will match files underneath the
oe-workdir symlink and fail. do_buildclean is called from do_clean which
is in turn called by devtool reset by default, and thus devtool reset is
blocked. An example of a recipe where this is visible is the openssl-qat
recipe in meta-intel.

In order to fix this, delete the symlinks at the start of do_buildclean
since we shouldn't need them at that point anyway, and thus make clean
won't be able to trip over them.

Fixes [YOCTO #11036].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 meta/classes/externalsrc.bbclass | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 8141f25..08e6e47 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -172,6 +172,7 @@  do_buildclean[nostamp] = "1"
 do_buildclean[doc] = "Call 'make clean' or equivalent in ${B}"
 externalsrc_do_buildclean() {
 	if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
+		rm -f ${@' '.join([x.split(':')[0] for x in (d.getVar('EXTERNALSRC_SYMLINKS') or '').split()])}
 		oe_runmake clean || die "make failed"
 		bbnote "nothing to do - no makefile found"