Oddly enough, the onnxruntime package doesn't have any packageconfig, or package that specifies -dbg -dev or any other related package. This was thoroughly checked using various bitbake commands and other methods to try and disable these non-exsistent packages.
I've come to an odd solution. I'm posting it here in case anyone else needs to forcibly remove a specific directory for a package.
# This removes the python library added by the package
PACKAGECONFIG:remove = "python"
# Needed for forcing the installation of this package even though it doesn't use what it compiles
INSANE_SKIP:${PN} += "installed-vs-shipped"
ALLOW_EMPTY:${PN} = "1"
ROOTFS_POSTPROCESS_COMMAND += "remove_debug_dir;"
remove_debug_dir() {
rm -rf ${IMAGE_ROOTFS}/usr/bin/${PN}
}
do_install:append() {
rm -rf ${D}${bindir}/${BP}
}
rm_debug() {
rm -rf ${D}/usr/bin/${PN}
}
do_package_qa[postfuncs] += "rm_debug"
If there is a better way of doing this, please let me know and I'll be happy to try it.