Re: Inappropriate error handling


On Fri, 03 Apr 2020 02:50:56 -0700
Thomas K├Âller <thomas@...> wrote:


here is an excerpt from a log of a failed build:

WARNING: icu-60.2-r0 do_populate_sysroot_setscene: Failed to fetch URL file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz, attempting MIRRORS if available
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: Fetcher failure: Unable to find file file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz anywhere. The paths that were searched were:
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: No suitable staging package found
WARNING: Logfile for failed setscene task is /mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/build/tmp/work/aarch64-poky-linux/icu/60.2-r0/temp/log.do_populate_sysroot_setscene.44028
WARNING: Setscene task (/mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/sources/poky/meta/recipes-support/icu/ failed with exit code '1' - real task will be run instead

As can be seen, a setscene task failed. I do not (yet) know why this happened, but that is not what this message is about. What matters is that the real task will be executed later, which works just fine, and the entire build runs to completion without any further errors. However, at the very end I get the following output:

Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

And then the non-zero exit code that is returned causes my script to take the error exit, even though the build products are all fine and perfectly usable. This really should not happen.
This has been discussed last month:

I ended up using Joshua Watt's suggestion to run the setscene tasks in a
separate bitbake process and ignore failure:

bitbake --setscene-only <target> || true
bitbake --skip-setscene <target>

I'd like to come up with something better but I don't have the bandwidth to
look into it further right now.


Paul Barker
Konsulko Group

Join to automatically receive all group messages.