diff options
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 18 | ||||
| -rw-r--r-- | bitbake/lib/bb/cookerdata.py | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index c34de303fb..3f351cbea6 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -150,6 +150,7 @@ class BBCooker: | |||
| 150 | 150 | ||
| 151 | def __init__(self, configuration, featureSet=None, idleCallBackRegister=None): | 151 | def __init__(self, configuration, featureSet=None, idleCallBackRegister=None): |
| 152 | self.recipecaches = None | 152 | self.recipecaches = None |
| 153 | self.eventlog = None | ||
| 153 | self.skiplist = {} | 154 | self.skiplist = {} |
| 154 | self.featureset = CookerFeatures() | 155 | self.featureset = CookerFeatures() |
| 155 | if featureSet: | 156 | if featureSet: |
| @@ -199,13 +200,6 @@ class BBCooker: | |||
| 199 | bb.debug(1, "BBCooker parsed base configuration %s" % time.time()) | 200 | bb.debug(1, "BBCooker parsed base configuration %s" % time.time()) |
| 200 | sys.stdout.flush() | 201 | sys.stdout.flush() |
| 201 | 202 | ||
| 202 | # we log all events to a file if so directed | ||
| 203 | if self.configuration.writeeventlog: | ||
| 204 | # register the log file writer as UI Handler | ||
| 205 | writer = EventWriter(self, self.configuration.writeeventlog) | ||
| 206 | EventLogWriteHandler = namedtuple('EventLogWriteHandler', ['event']) | ||
| 207 | bb.event.register_UIHhandler(EventLogWriteHandler(writer)) | ||
| 208 | |||
| 209 | self.inotify_modified_files = [] | 203 | self.inotify_modified_files = [] |
| 210 | 204 | ||
| 211 | def _process_inotify_updates(server, cooker, abort): | 205 | def _process_inotify_updates(server, cooker, abort): |
| @@ -449,6 +443,16 @@ class BBCooker: | |||
| 449 | if hasattr(self.configuration, o): | 443 | if hasattr(self.configuration, o): |
| 450 | setattr(self.configuration, o, options[o]) | 444 | setattr(self.configuration, o, options[o]) |
| 451 | 445 | ||
| 446 | if self.configuration.writeeventlog: | ||
| 447 | if self.eventlog and self.eventlog[0] != self.configuration.writeeventlog: | ||
| 448 | bb.event.unregister_UIHhandler(self.eventlog[1]) | ||
| 449 | if not self.eventlog or self.eventlog[0] != self.configuration.writeeventlog: | ||
| 450 | # we log all events to a file if so directed | ||
| 451 | # register the log file writer as UI Handler | ||
| 452 | writer = EventWriter(self, self.configuration.writeeventlog) | ||
| 453 | EventLogWriteHandler = namedtuple('EventLogWriteHandler', ['event']) | ||
| 454 | self.eventlog = (self.configuration.writeeventlog, bb.event.register_UIHhandler(EventLogWriteHandler(writer))) | ||
| 455 | |||
| 452 | bb.msg.loggerDefaultLogLevel = self.configuration.default_loglevel | 456 | bb.msg.loggerDefaultLogLevel = self.configuration.default_loglevel |
| 453 | bb.msg.loggerDefaultDomains = self.configuration.debug_domains | 457 | bb.msg.loggerDefaultDomains = self.configuration.debug_domains |
| 454 | 458 | ||
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 9eddf7cf6a..3baa9ade1b 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
| @@ -62,7 +62,7 @@ class ConfigParameters(object): | |||
| 62 | "extra_assume_provided", "profile", | 62 | "extra_assume_provided", "profile", |
| 63 | "prefile", "postfile", "server_timeout", | 63 | "prefile", "postfile", "server_timeout", |
| 64 | "nosetscene", "setsceneonly", "skipsetscene", | 64 | "nosetscene", "setsceneonly", "skipsetscene", |
| 65 | "runall", "runonly"]: | 65 | "runall", "runonly", "writeeventlog"]: |
| 66 | options[o] = getattr(self.options, o) | 66 | options[o] = getattr(self.options, o) |
| 67 | 67 | ||
| 68 | options['build_verbose_shell'] = self.options.verbose | 68 | options['build_verbose_shell'] = self.options.verbose |
