AnsweredAssumed Answered

Yocto: $THISDIR problem

Question asked by Dmitry Varakin on Jun 25, 2015
Latest reply on Jun 30, 2015 by gusarambula

Hello!

 

There is a problem with $THISDIR resolving in Yocto (1.8 / Fido). I just want to ask if it's a bug or expexted behavior.

 

I created *.inc file which simply replaces patching mechanism. Instead of making patches for each change I just want to overwrite old files with new, manually edited. Just to make my layer a bit more "developer-friendly" for quick tests.

 

patch-sources.inc

do_unpack_append() {

    bb.build.exec_func('do_update_sources', d)

}

 

do_update_sources() {

    cp ${THISDIR}/${PN}/update/ ${S} -R

}

 

Once I add this file to *.bbappend, I expect any sources located in meta-mylayer/.../${PN}/update to be copied on top of extracted sources:

 

meta-mylayer/.../u-boot-fslc_2015.04.bbappend

require ${THISDIR}/../../recipes-common/patch-sources.inc

 

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

 

So...

in bbappend file: ${THISDIR} is resolved to meta-mylayer/... in both cases.

but in included patch-sources.inc: ${THISDIR} is resolved to meta-fsl-arm/...

 

Is it OK or a bug?

 

--

Dmitry

Outcomes