diff options
-rw-r--r-- | bitbake/lib/bb/__init__.py | 8 | ||||
-rw-r--r-- | bitbake/lib/bb/build.py | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index 1a30fa11d7..1f7946e7b7 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py | |||
@@ -94,11 +94,11 @@ def note(*args): | |||
94 | def warn(*args): | 94 | def warn(*args): |
95 | logger.warn(''.join(args)) | 95 | logger.warn(''.join(args)) |
96 | 96 | ||
97 | def error(*args): | 97 | def error(*args, **kwargs): |
98 | logger.error(''.join(args)) | 98 | logger.error(''.join(args), extra=kwargs) |
99 | 99 | ||
100 | def fatal(*args): | 100 | def fatal(*args, **kwargs): |
101 | logger.critical(''.join(args)) | 101 | logger.critical(''.join(args), extra=kwargs) |
102 | raise BBHandledException() | 102 | raise BBHandledException() |
103 | 103 | ||
104 | def deprecated(func, name=None, advice=""): | 104 | def deprecated(func, name=None, advice=""): |
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index cce01feba2..34399640c0 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -350,6 +350,8 @@ exit $? | |||
350 | # The caller will call exit themselves, so bb.error() is | 350 | # The caller will call exit themselves, so bb.error() is |
351 | # what we want here rather than bb.fatal() | 351 | # what we want here rather than bb.fatal() |
352 | bb.error(value) | 352 | bb.error(value) |
353 | elif cmd == 'bbfatal_log': | ||
354 | bb.error(value, forcelog=True) | ||
353 | elif cmd == 'bbdebug': | 355 | elif cmd == 'bbdebug': |
354 | splitval = value.split(' ', 1) | 356 | splitval = value.split(' ', 1) |
355 | level = int(splitval[0]) | 357 | level = int(splitval[0]) |
@@ -446,7 +448,10 @@ def _exec_task(fn, task, d, quieterr): | |||
446 | self.triggered = False | 448 | self.triggered = False |
447 | logging.Handler.__init__(self, logging.ERROR) | 449 | logging.Handler.__init__(self, logging.ERROR) |
448 | def emit(self, record): | 450 | def emit(self, record): |
449 | self.triggered = True | 451 | if getattr(record, 'forcelog', False): |
452 | self.triggered = False | ||
453 | else: | ||
454 | self.triggered = True | ||
450 | 455 | ||
451 | # Handle logfiles | 456 | # Handle logfiles |
452 | si = open('/dev/null', 'r') | 457 | si = open('/dev/null', 'r') |