How to share files between recipes?

Patrick Doyle <wpdster@...>

I have a set of data files (cryptographic keys) that I would like to
share among several recipes in my build. They won't go into the
rootfs, but they will be used by multiple recipes that construct the
rootfs. So, to the best of my understanding, it seems like I should
put them in sysroot and somehow access them from there.

I constructed the following recipe:
SUMMARY = "Development keys used by my image"
DESCRIPTION = "Install the development keys in the sysroot so that they \
can be referenced by other recipes."

LICENSE = "Proprietary"

SRC_URI = "file://keys"

do_install() {
install -d ${D}/${datadir}
install -m 755 -d ${WORKDIR}/keys ${D}/${datadir}

FILES_${PN} += "${datadir}/keys/"

But when I attempt to bitbake this recipe, I get the following error:
ERROR: development-keys-1.0-r0 do_package: QA Issue: development-keys:
Files/directories were installed but not shipped in any package:

Ummm.... I don't put anything in /usr or /usr/share.
I don't inherit from anything (other than base.bbclass) that puts
anything in /usr or /usr/share.

Does base.bbclass put anything in /usr or /usr/share?
I suppose I could follow the advice given in the error message and

rm -rf ${D}/usr

in my do_install() task, but I'd like to understand why and how those
directories are being created in the first place?


Join to automatically receive all group messages.