diff options
author | Chris Larson <clarson@kergoth.com> | 2004-12-26 01:23:43 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-12-26 01:23:43 +0000 |
commit | 5bad6c59ffa16ce98f5d679d9f65bfc05f021046 (patch) | |
tree | 80c82f0e0adb457d371d5b1ac40a2479cd59cd1f | |
parent | b573c353c8d55991b1bd1c3375d02b5a1f290abc (diff) | |
download | bitbake-5bad6c59ffa16ce98f5d679d9f65bfc05f021046.tar.gz |
Re-raise bb.build.FuncFailed if it's encountered in emit_var. This ensures that builds of packages that attempt to read the kernel-version file (like kernel modules) fail as they should.
-rw-r--r-- | lib/bb/data.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py index 5ec6d9561..2d63cf061 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -244,9 +244,10 @@ def expand(s, d = _data, varname = None): if type(s) is not types.StringType: # sanity check import bb bb.error('expansion of %s returned non-string %s' % (olds, s)) + except KeyboardInterrupt: + raise except: - import bb - bb.note("%s:%s while evaluating:\n%s" % (sys.exc_info()[0], sys.exc_info()[1], s)) + note("%s:%s while evaluating:\n%s" % (sys.exc_info()[0], sys.exc_info()[1], s)) raise return s @@ -326,7 +327,10 @@ def emit_var(var, o=sys.__stdout__, d = _data, all=False): except KeyboardInterrupt: raise except: - o.write('# expansion of %s threw %s\n' % (var, sys.exc_info()[0])) + excname = str(sys.exc_info()[0]) + if excname == "bb.build.FuncFailed": + raise + o.write('# expansion of %s threw %s\n' % (var, excname)) return 0 if all: |