Skip to content

Commit

Permalink
lmp/bb-build: clarify the bitbake notification
Browse files Browse the repository at this point in the history
- add notification about the end
- change the finish notification to post processing

When there are errors during the bitbake build it is always necessary
to perform some additional post-processing steps such as:

== Run bitbake (finish)
== Run bitbake (rsync factory sstate-cache mirror)

Script completed with error(s)

Only after this last step is reported that there was an error.
This leads the user to think that the error was in the last step,
in this case the rsync, which is not true.

Example:

Summary: 1 task failed:
  /srv/oe/build/conf/../../layers/meta-subscriber-overrides/recipes-samples/images/lmp-factory-image.bb:do_image_garagecheck
Summary: There were 4 WARNING messages.
Summary: There was 1 ERROR message, returning a non-zero exit code.
== 2024-10-10 12:00:20 Run bitbake (finish)
bootchart written to '/archive/bitbake_buildchart.svg'
== 2024-10-10 12:00:24 Run bitbake (rsync factory sstate-cache mirror)
Script completed with error(s)
== 2024-10-10 12:01:32.828429: Finding artifacts to upload
Uploading 14 items 53779607 bytes
== 2024-10-10 12:01:36.053422: Runner has completed
          ________
          |  o  o|           Thumbs Down
          |___/\_|________
          |       _____|__|
          |      |     ||
          |______|
          | |  | |
          | |  | |
          |_|  |_|

Signed-off-by: Jose Quaresma <[email protected]>
  • Loading branch information
quaresmajose committed Oct 16, 2024
1 parent 652f49e commit ee2fddf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lmp/bb-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function finish() {
# allow this block to fail
set +e

status "Run bitbake (finish)"
status "Run bitbake (post processing)"

# we need to check that because it is not available before kirkstone
if command -v bitbake-getvar >/dev/null 2>&1; then
Expand Down Expand Up @@ -44,6 +44,7 @@ function finish() {
SSTATE_DIR="$(grep "^SSTATE_DIR=" ${archive}/bitbake_global_env.txt | cut -d'=' -f2 | tr -d '"')"
rsync -vv -a --copy-links --copy-dirlinks --hard-links ${SSTATE_DIR}/ ${FACTORY_SSTATE_CACHE_MIRROR}/ > ${archive}/bitbake_sstatemirror.log

status "Run bitbake (done)"
exit $rc
}

Expand Down

0 comments on commit ee2fddf

Please sign in to comment.