aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-12-26 01:23:43 +0000
committerChris Larson <clarson@kergoth.com>2004-12-26 01:23:43 +0000
commit5bad6c59ffa16ce98f5d679d9f65bfc05f021046 (patch)
tree80c82f0e0adb457d371d5b1ac40a2479cd59cd1f /lib/bb
parentb573c353c8d55991b1bd1c3375d02b5a1f290abc (diff)
downloadbitbake-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.
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/data.py10
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: