From: Chris Larson Date: Fri, 10 Sep 2010 18:34:39 +0000 (-0700) Subject: Fix bitbake -k issue introduced by build exception cleanup X-Git-Tag: 2011-1~3158 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=c90bfa57f5368ff833dc0a39c010a13df8c3b54c;p=openembedded-core.git Fix bitbake -k issue introduced by build exception cleanup A SystemExit from a python function wasn't being raised as a FuncFailed, which resulted in it not being caught by the exception handlers in the runqueue for the worker process, which resulted in a SystemExit exit, rather than os._exit, which causes all manner of problems when used in a forked process. This fixes it by ensuring we raise a FuncFailed when seeing exceptions which aren't instances of Exception. (Bitbake rev: dafe92fe9f387450d9f9e9ff41c99388998b7495) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index e800d5cf08..7061cee20d 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -178,8 +178,8 @@ def exec_func_python(func, d, runfile, logfile): comp = utils.better_compile(tmp, func, bbfile) try: utils.better_exec(comp, {"d": d}, tmp, bbfile) - except Exception as exc: - if isinstance(exc, (bb.parse.SkipPackage, bb.build.FuncFailed)): + except: + if sys.exc_info()[0] in (bb.parse.SkipPackage, bb.build.FuncFailed): raise raise FuncFailed(func, d, logfile)