* [PATCHv2 0/1] Avoid build failures due to setscene errors
@ 2017-08-29 20:36 Peter Kjellerstedt
2017-08-29 20:36 ` [PATCHv2 1/1] sstate.bbclass: Do not cause " Peter Kjellerstedt
0 siblings, 1 reply; 2+ messages in thread
From: Peter Kjellerstedt @ 2017-08-29 20:36 UTC (permalink / raw)
To: openembedded-core
Occasionally, we see errors on our autobuilders where a setscene task
fails to retrieve a file from our global sstate cache. It typically
looks something like this:
WARNING: zip-3.0-r2 do_populate_sysroot_setscene: Failed to fetch URL
file://66/sstate:zip:core2-64-poky-linux:3.0:r2:core2-64:3:\
66832b8c4e7babe0eac9d9579d1e2b6a_populate_sysroot.tgz;\
downloadfilename=66/sstate:zip:core2-64-poky-linux:3.0:r2:core2-64:3:\
66832b8c4e7babe0eac9d9579d1e2b6a_populate_sysroot.tgz, attempting
MIRRORS if available
ERROR: zip-3.0-r2 do_populate_sysroot_setscene: Fetcher failure:
Unable to find file
file://66/sstate:zip:core2-64-poky-linux:3.0:r2:core2-64:3:\
66832b8c4e7babe0eac9d9579d1e2b6a_populate_sysroot.tgz;\
downloadfilename=66/sstate:zip:core2-64-poky-linux:3.0:r2:core2-64:3:\
66832b8c4e7babe0eac9d9579d1e2b6a_populate_sysroot.tgz anywhere. The
paths that were searched were:
/home/pkj/.openembedded/sstate-cache
ERROR: zip-3.0-r2 do_populate_sysroot_setscene: No suitable staging
package found
WARNING: Setscene task
(meta/recipes-extended/zip/zip_3.0.bb:do_populate_sysroot_setscene)
failed with exit code '1' - real task will be run instead
As the last warning indicates, the build will proceed and the real
task will run and the build will eventually complete. However, due to
the two errors above, bitbake will return with an error code which
causes the autobuilder to treat the build as failed and it proceeds to
throw everything it built away.
Since this is quite pointless and causes unnecessary build resources
to be spent and grief from the developers, the two patches in this
change set turn the errors from setscene tasks into warnings.
PATCHv2: The bitbake part has been sent to the bitbake mailing list
instead.
//Peter
The following changes since commit bc2e0b2e9b95707d96c840dade12b00e1450ecc3:
libsdl: Move PACKAGECONFIG options from meta-mingw (2017-08-29 12:23:10 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/setscene-errors
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/setscene-errors
Peter Kjellerstedt (1):
sstate.bbclass: Do not cause build failures due to setscene errors
meta/classes/sstate.bbclass | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
2.12.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCHv2 1/1] sstate.bbclass: Do not cause build failures due to setscene errors
2017-08-29 20:36 [PATCHv2 0/1] Avoid build failures due to setscene errors Peter Kjellerstedt
@ 2017-08-29 20:36 ` Peter Kjellerstedt
0 siblings, 0 replies; 2+ messages in thread
From: Peter Kjellerstedt @ 2017-08-29 20:36 UTC (permalink / raw)
To: openembedded-core
If a setscene task fails, the real task will be run instead. However,
in case the failed setscene task happened to log any errors, this will
still cause bitbake to return with an error code, even though
everything actually built ok. To avoid this, modify setscene to only
warn about errors.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes/sstate.bbclass | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 6af0d388bc..7d76ac141b 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -671,7 +671,7 @@ def pstaging_fetch(sstatefetch, sstatepkg, d):
localdata.setVar('SRC_URI', srcuri)
try:
fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
- fetcher.download()
+ fetcher.download(only_warn=True)
except bb.fetch2.BBFetchException:
break
@@ -680,7 +680,8 @@ def sstate_setscene(d):
shared_state = sstate_state_fromvars(d)
accelerate = sstate_installpkg(shared_state, d)
if not accelerate:
- bb.fatal("No suitable staging package found")
+ bb.warn("No suitable staging package found")
+ sys.exit(1)
python sstate_task_prefunc () {
shared_state = sstate_state_fromvars(d)
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-29 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-29 20:36 [PATCHv2 0/1] Avoid build failures due to setscene errors Peter Kjellerstedt
2017-08-29 20:36 ` [PATCHv2 1/1] sstate.bbclass: Do not cause " Peter Kjellerstedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox