In componentB.bb I have function do_install:

do_install () {
install -m 0755 -d ${D}/usr/share
cmake_do_install
install -m 0755 ${THISDIR}/default/script.sh  ${D}/usr/share
}

In componentB.bbapend I overwrite function in order to install other
script instead:

do_install () {
install -m 0755 -d ${D}/usr/share
cmake_do_install
install -m 0755 ${THISDIR}/files/script.sh  ${D}/usr/share
}

The problem is that ${THISDIR} indicates IN BOTH CASES to path
meta-layer-A/recipes-X/componentB.
So how to tell bitbake in componentB.bbappend to install my script
from path meta-layer-B/recipes-X/componentB/files? It is really
frustrating that variable THISDIR doesn't indicates to path
meta-layer-B/recipes-X/componentB when I used it in
componentB.bbapend.

If script.sh is included in SRC_URI, bitbake will copy it to ${WORKDIR}. The one in meta-layer-B will overwrite the one from meta-layer-A.
Then install from ${WORKDIR} i.s.o. ${THISDIR}:
install -m 0755 ${WORKDIR}/script.sh  ${D}/usr/share

regards, Winfried
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to