mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 21:32:13 +02:00
bitbake: cooker/cookerdata: Ensure UI event log is updated from commandline
Currently the eventlog is not handled correctly for memory resident bitbake. Fix this by allowing adpations to configuration changes. (Bitbake rev: f7d2c9116116659ea42260a3bb96dca100aadae7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -150,6 +150,7 @@ class BBCooker:
|
||||
|
||||
def __init__(self, configuration, featureSet=None, idleCallBackRegister=None):
|
||||
self.recipecaches = None
|
||||
self.eventlog = None
|
||||
self.skiplist = {}
|
||||
self.featureset = CookerFeatures()
|
||||
if featureSet:
|
||||
@@ -199,13 +200,6 @@ class BBCooker:
|
||||
bb.debug(1, "BBCooker parsed base configuration %s" % time.time())
|
||||
sys.stdout.flush()
|
||||
|
||||
# we log all events to a file if so directed
|
||||
if self.configuration.writeeventlog:
|
||||
# register the log file writer as UI Handler
|
||||
writer = EventWriter(self, self.configuration.writeeventlog)
|
||||
EventLogWriteHandler = namedtuple('EventLogWriteHandler', ['event'])
|
||||
bb.event.register_UIHhandler(EventLogWriteHandler(writer))
|
||||
|
||||
self.inotify_modified_files = []
|
||||
|
||||
def _process_inotify_updates(server, cooker, abort):
|
||||
@@ -449,6 +443,16 @@ class BBCooker:
|
||||
if hasattr(self.configuration, o):
|
||||
setattr(self.configuration, o, options[o])
|
||||
|
||||
if self.configuration.writeeventlog:
|
||||
if self.eventlog and self.eventlog[0] != self.configuration.writeeventlog:
|
||||
bb.event.unregister_UIHhandler(self.eventlog[1])
|
||||
if not self.eventlog or self.eventlog[0] != self.configuration.writeeventlog:
|
||||
# we log all events to a file if so directed
|
||||
# register the log file writer as UI Handler
|
||||
writer = EventWriter(self, self.configuration.writeeventlog)
|
||||
EventLogWriteHandler = namedtuple('EventLogWriteHandler', ['event'])
|
||||
self.eventlog = (self.configuration.writeeventlog, bb.event.register_UIHhandler(EventLogWriteHandler(writer)))
|
||||
|
||||
bb.msg.loggerDefaultLogLevel = self.configuration.default_loglevel
|
||||
bb.msg.loggerDefaultDomains = self.configuration.debug_domains
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class ConfigParameters(object):
|
||||
"extra_assume_provided", "profile",
|
||||
"prefile", "postfile", "server_timeout",
|
||||
"nosetscene", "setsceneonly", "skipsetscene",
|
||||
"runall", "runonly"]:
|
||||
"runall", "runonly", "writeeventlog"]:
|
||||
options[o] = getattr(self.options, o)
|
||||
|
||||
options['build_verbose_shell'] = self.options.verbose
|
||||
|
||||
Reference in New Issue
Block a user