The bb.fatal() is defined as:
def fatal(*args):
logger.critical(''.join(args))
sys.exit(1)
So anything after bb.fatal() in the same code block doesn't have any
effect, e.g.:
bb.fatal("%s_%s: %s" % (var, pkg, e))
raise e
The "raise e" should be removed.
I searched all the files which use bb.fatal(), only the following 3
classes have this issues:
insane.bbclass
package.bbclass
package_rpm.bbclass
[YOCTO #4461]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
rvar = bb.utils.explode_dep_versions2(localdata.getVar(var, True) or "")
except ValueError as e:
bb.fatal("%s_%s: %s" % (var, pkg, e))
- raise e
for dep in rvar:
for v in rvar[dep]:
if v and not v.startswith(('< ', '= ', '> ', '<= ', '>=')):
auto_pr=prserv_get_pr_auto(d)
except Exception as e:
bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
- return
if auto_pr is None:
if d.getVar('PRSERV_LOCKDOWN', True):
bb.fatal("Can NOT get PRAUTO from lockdown exported file")
pkgdest = d.getVar('PKGDEST', True)
if not pkgdest:
bb.fatal("No PKGDEST")
- return
outspecfile = d.getVar('OUTSPECFILE', True)
if not outspecfile:
bb.fatal("No OUTSPECFILE")
- return
# Construct the SPEC file...
srcname = strip_multilib(d.getVar('PN', True), d)