[yocto] non-zero exit code after ultimately successful build

Sara Sinback sara.sinback at gmail.com
Fri Jan 6 13:41:41 PST 2017


Hi all,

This is my first post to this list, so my apologies if I have not
conformed in some way to the posting etiquette.

I'm managing on a CI server that starts many morty builds which use
the setscene state cache to do incremental builds where possible. I
have a problem which can be broken down into two parts: Currently, I'm
encountering a bug which seems to be limited only to the setscene
world. I see it on six setscene tasks out of hundreds. After each
failed setscene tasks, the "real task" is run instead, successfully.
That is, the build itself succeeds. Here's
a pastebin with the error and the setscene tasks that it happens in,
in case you'd like to peruse that. http://pastebin.com/R93JxF7b

Apparently, somebody has actually fixed this problem already, but it
seems the fix has not yet been merged into morty. Here's the
discussion where Ross mentioned fixing it.
https://www.mail-archive.com/search?l=yocto@yoctoproject.org&q=subject:%22Re%5C%3A+%5C%5Byocto%5C%5D+populate_sdk_ext%5C%3A+Unable+to+locate+package+nativesdk%5C-buildtools%5C-perl%5C-dummy%22&o=newest&f=1
I haven't had time to look into the fix yet myself. So maybe nobody
needs to do a lot of work about this part of the problem right now,
except maybe merge in the fix Ross mentioned.

Here's the second part of the problem, which is more relevant to me personally:

Because of the error messages generated by setscene (which the build
recovers from by itself), my bitbake command returns an exit code of 1
even though the build has ultimately succeeded. This is very
frustrating for me, because each of these tasks is being run
autonomously by a CI server, which has no clean way of telling that
the bitbake actually succeeded!

In my view, this is a non-desirable behavior for bitbake. Can you help
me find a workaround for this? I googled a bunch and looked in the
docs for a way to suppress setscene errors that the build process
recovers from, but after a few hours of investigating, I have yet to
find a clean workaround.

If there isn't a way to keep bitbake from having a non-zero return
code because of setscene failures the build works around, might I
suggest we return a special return code in that case? That way, it
would be easier to configure my CI server to know that "nothing is
really wrong" and continue with its other steps, which depend on this
build, unhindered. This would make my life a lot easier!

Thanks for any help!
Sara Sinback



More information about the yocto mailing list