diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2013-05-08 05:06:46 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-16 00:05:07 +0300 |
commit | 4c47525c5a171b1282615c9fbc7d84addef85f92 (patch) | |
tree | a5a28be0e03dce7b0186db77374e008b7aad704a /meta | |
parent | d6fb741dfd828d40317175a624065918b3e5bfec (diff) | |
download | openembedded-core-4c47525c5a171b1282615c9fbc7d84addef85f92.tar.gz openembedded-core-4c47525c5a171b1282615c9fbc7d84addef85f92.tar.bz2 openembedded-core-4c47525c5a171b1282615c9fbc7d84addef85f92.zip |
bbclass: bb.fatal() clean up
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/insane.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/package_rpm.bbclass | 2 |
3 files changed, 0 insertions, 4 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index fb1802223a..3ed5581949 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -718,7 +718,6 @@ def package_qa_check_deps(pkg, pkgdest, skip, d): 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(('< ', '= ', '> ', '<= ', '>=')): diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 0f2743d106..02a1460624 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -372,7 +372,6 @@ python package_get_auto_pr() { 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") diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 25b14dd79d..8935c9fc6a 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -672,12 +672,10 @@ python write_specfile () { 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) |