| Summary: | do_package can show errors but succeed | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Igor Stoppa <igor.stoppa> |
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> |
| Status: | VERIFIED FIXED | QA Contact: | Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu> |
| Severity: | normal | ||
| Priority: | High | CC: | bogdanx.a.voiculescu, patrick.ohly, poky.bs.watcher, poky.watcher |
| Version: | unspecified | ||
| Target Milestone: | 2.1 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Igor Stoppa
2016-01-11 14:39:54 UTC
In the premise, replace the first occurrence of "package" with "recipe". Issue root caused, patch sent to the list (http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/wip&id=bc6d92fbf8ee60dcb6e05c7845a4ffdceeda98ad) The bug mentioned here is valid, the explanation of what is happening is not correct though, this has nothing to do with sstate.
The problem was that do_package and show ERROR messages but then the task can succeed rather than fail. That means the build continues without failing but due to the ERROR messages, bitbake sets a failure exit code.
Upon a subsequent build, things work fine since the task succeeded and since the task isn't rerun, no ERROR messages are shown.
What would have been useful here was a reproducer for the bug. I created one by adding:
do_install_append () {
touch ${D}/dummy
}
to the bash recipe and then building bash. After the proposed patch, this fails every time and the do_package task never succeeds.
Verified on master: Build Configuration: BB_VERSION = "1.29.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-14.04" TARGET_SYS = "aarch64-poky-linux" MACHINE = "qemuarm64" DISTRO = "poky" DISTRO_VERSION = "2.0+snapshot-20160224" TUNE_FEATURES = "aarch64" TARGET_FPU = "" meta meta-yocto meta-yocto-bsp = "master:36b43b233c841b3c09fc17e04686b4b758780963" NOTE: Preparing RunQueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: QA Issue: bash: Files/directories were installed but not shipped in any package: /dummy Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. bash: 1 installed and not shipped files. [installed-vs-shipped] ERROR: Fatal QA errors found, failing task. ERROR: Function failed: do_package ERROR: Logfile of failure stored in: /home/yocto/yocto/poky-test/8891/build/tmp/work/aarch64-poky-linux/bash/4.3.30-r0/temp/log.do_package.5110 ERROR: Task 14 (/home/yocto/yocto/poky-test/poky/meta/recipes-extended/bash/bash_4.3.30.bb, do_package) failed with exit code '1' NOTE: Tasks Summary: Attempted 677 tasks of which 676 didn't need to be rerun and 1 failed. No currently running tasks (568 of 682) Summary: 1 task failed: /home/yocto/yocto/poky-test/poky/meta/recipes-extended/bash/bash_4.3.30.bb, do_package |