Search code examples
yoctobitbakeopenembedded

Yocto - exclude files from -dev package


I have a great problem moving some header files from FILES_${PN}-dev to a custom dev-internal package.

In OpenEmbedded documentation there is explicitly stated that there is "no actual support for explicitly excluding files from packaging".

I tried this:

FILES_${PN}-dev = ""
PACKAGES += "${PN}-dev-internal"
FILES_${PN}-dev-internal = "${includedir}/<my-pattern>.h"
FILES_${PN}-dev = "<original-content>"

but it seems that the first defined package captures first anyway.

Is there any known workaround for this? Except of naming everything explicitly in both packages content which is highly, really undesirable.


Solution

  • but it seems that the first defined package captures first anyway.

    Yes. So put PN-dev-internal before PN-dev in PACKAGES. This might work:

    PACKAGES =+ "${PN}-dev-internal"
    

    If not, PACKAGE_BEFORE_PN is useful.