Created attachment 2885 [details] Test bbclass If subprocess.CalledProcessError is raised in an eventhandler, bitbake will exit but the exit code will be 0. It is expected that the exitcode should be non-zero. Steps to reproduce: 1. Add mytest.bbclass to meta/classes 2. Add INHERIT += "mytest" to local.conf 3. bitbake core-image-minimal You should see: ('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())% This was originally discovered when using uninative.bbclass and the loader was missing. I just made a simpler testcase. Also if you look in bitbake/lib/bb/event.py where the exception is handled on line 33, it seems that it really is the "value" parameter being subprocess.CalledProcessError causing the problem. If you set "value" to None, or even raise a different exception in the event handler the logger message is displayed, and the exit code is non-zero.
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5de3800c3081dfa3db55f80788eaeda6dd7d9f29
Verified: no errors on master: bitbake core-image-minimal Parsing recipes: 100% |##########################################################################################################################################################| Time: 00:00:10 Parsing of 885 .bb files complete (0 cached, 885 parsed). 1314 targets, 57 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.28.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-14.04" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "beaglebone" DISTRO = "poky" DISTRO_VERSION = "2.0+snapshot-20160106" TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard cortexa8" TARGET_FPU = "vfp-neon" meta meta-yocto meta-yocto-bsp = "master:2cd061a29a94fdcdfec86732e6bcbb71c12c4afc" NOTE: Preparing RunQueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks NOTE: Tasks Summary: Attempted 2215 tasks of which 460 didn't need to be rerun and all succeeded.