summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2013-05-08 05:06:46 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-16 00:09:47 +0300
commit51c3e9df28619bfa5a6c22a7c91c7c7093080c87 (patch)
treebc635ace3154602741df836574457ae976a5846d /meta/classes
parentbfaf6c5278288eecefddaf3db1a0631bd20c33ce (diff)
downloadpoky-51c3e9df28619bfa5a6c22a7c91c7c7093080c87.tar.gz
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] (From OE-Core rev: 4c47525c5a171b1282615c9fbc7d84addef85f92) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/insane.bbclass1
-rw-r--r--meta/classes/package.bbclass1
-rw-r--r--meta/classes/package_rpm.bbclass2
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):
718 rvar = bb.utils.explode_dep_versions2(localdata.getVar(var, True) or "") 718 rvar = bb.utils.explode_dep_versions2(localdata.getVar(var, True) or "")
719 except ValueError as e: 719 except ValueError as e:
720 bb.fatal("%s_%s: %s" % (var, pkg, e)) 720 bb.fatal("%s_%s: %s" % (var, pkg, e))
721 raise e
722 for dep in rvar: 721 for dep in rvar:
723 for v in rvar[dep]: 722 for v in rvar[dep]:
724 if v and not v.startswith(('< ', '= ', '> ', '<= ', '>=')): 723 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() {
372 auto_pr=prserv_get_pr_auto(d) 372 auto_pr=prserv_get_pr_auto(d)
373 except Exception as e: 373 except Exception as e:
374 bb.fatal("Can NOT get PRAUTO, exception %s" % str(e)) 374 bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
375 return
376 if auto_pr is None: 375 if auto_pr is None:
377 if d.getVar('PRSERV_LOCKDOWN', True): 376 if d.getVar('PRSERV_LOCKDOWN', True):
378 bb.fatal("Can NOT get PRAUTO from lockdown exported file") 377 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 () {
672 pkgdest = d.getVar('PKGDEST', True) 672 pkgdest = d.getVar('PKGDEST', True)
673 if not pkgdest: 673 if not pkgdest:
674 bb.fatal("No PKGDEST") 674 bb.fatal("No PKGDEST")
675 return
676 675
677 outspecfile = d.getVar('OUTSPECFILE', True) 676 outspecfile = d.getVar('OUTSPECFILE', True)
678 if not outspecfile: 677 if not outspecfile:
679 bb.fatal("No OUTSPECFILE") 678 bb.fatal("No OUTSPECFILE")
680 return
681 679
682 # Construct the SPEC file... 680 # Construct the SPEC file...
683 srcname = strip_multilib(d.getVar('PN', True), d) 681 srcname = strip_multilib(d.getVar('PN', True), d)