Yocto: $THISDIR problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto: $THISDIR problem

1,932 Views
dmitryv
Contributor II

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

Labels (1)
2 Replies

1,052 Views
daiane_angolini
NXP Employee
NXP Employee

Did _require_ work?

I would expect require to look for a patch-sources.inc inside other layer.

In fact I don't understand your point with this change. I have never saw THIS_DIR being used in installation process.

What do you really want to do?

0 Kudos

1,052 Views
gusarambula
NXP TechSupport
NXP TechSupport

Just adding to Daiane's comment. I would like to know where is the .inc file located since that may also affect how the THISDIR variable is interpreted. In both cases inside meta-mylayer it seems to be giving the correct directory back.