Search code examples
linuxbitbakeopenembedded

Bitbake - non debug package contains .debug directory


I need to create a .ipk package from Bitbake script. My bb file:

...
PR = "r0"
PACKAGES = "${PN}"

SRC_URI = " \
    file://mypackage \
    file://mypackage-startup \
"

do_install() {
    install -m 0775 -d ${D}/userdata/costume
    install -m 0744 ${WORKDIR}/mypackage ${D}/userdata/costume/mypackage
    install -m 0644 ${WORKDIR}/mypackage-startup ${D}/userdata/costume/mypackage-startup
}

FILES_${PN} += "/userdata/costume"
FILES_${PN}-dbg += "/userdata/costume/.debug"

...

But I receive the next error:

ERROR: QA Issue with mypackage: non debug package contains .debug directory: mypackage path /work/.../mypackage-1.0-r0/packages-split/mypackage/userdata/costume/.debug/mypackage FATAL: QA run found fatal errors. Please consider fixing them. ERROR: Error in executing python function in: /home/nickname/build/mypackage.bb ERROR: Exception: Message:1 ERROR: Printing the environment of the function ERROR: Function do_package_qa failed ERROR: TaskFailed event exception, aborting ERROR: Build of /home/nickname/build/mypackage.bb do_package failed

Line with FILES_${PN}-dbg was added after net surfing. But this fix not helped in my situation.


Solution

  • You set PACKAGES = "${PN}" which means the debug package is never created (the default value of PACKAGES does contain ${PN}-dbg).

    Either remove the PACKAGES line (if you didn't have a good reason for it) or use

    PACKAGES = "${PN}-dbg ${PN}"