summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-09-11 13:57:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-18 09:04:24 +0100
commit20609eebee0d2318806cf81913e7ce6dc1005507 (patch)
treed3ed4bcc85a633308ef080ef7e0c7478f5fb1f7b
parenta065f7e5e9c07dbd71a98e7db1d7f711607716f3 (diff)
downloadbitbake-20609eebee0d2318806cf81913e7ce6dc1005507.zip
toaster: Read correct cooker log path from toasterui
The BB_CONSOLELOG variable changes by the time we read it in BuildInfoHelper. This means that the log file location we are using is incorrect, so the links to the cooker logs don't work. Instead, read it at the point when the BuildStarted event occurs in toasterui. The BB_CONSOLELOG variable has the correct value here, so pass that to BuildInfoHelper. [YOCTO #8209] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/ui/buildinfohelper.py8
-rw-r--r--lib/bb/ui/toasterui.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 2d1ed511..6e313fee 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -704,7 +704,7 @@ class BuildInfoHelper(object):
## methods to convert event/external info into objects that the ORM layer uses
- def _get_build_information(self):
+ def _get_build_information(self, consolelogfile):
build_info = {}
# Generate an identifier for each new build
@@ -713,7 +713,7 @@ class BuildInfoHelper(object):
build_info['distro_version'] = self.server.runCommand(["getVariable", "DISTRO_VERSION"])[0]
build_info['started_on'] = timezone.now()
build_info['completed_on'] = timezone.now()
- build_info['cooker_log_path'] = self.server.runCommand(["getVariable", "BB_CONSOLELOG"])[0]
+ build_info['cooker_log_path'] = consolelogfile
build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0]
build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0]
@@ -847,9 +847,9 @@ class BuildInfoHelper(object):
logger.warn("buildinfohelper: cannot identify layer exception:%s ", nee)
- def store_started_build(self, event):
+ def store_started_build(self, event, consolelogfile):
assert '_pkgs' in vars(event)
- build_information = self._get_build_information()
+ build_information = self._get_build_information(consolelogfile)
build_obj = self.orm_wrapper.create_build_object(build_information, self.brbe, self.project)
diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index 9c7e87dd..e0c278bb 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -126,7 +126,7 @@ def main(server, eventHandler, params ):
# the code will look into the protected variables of the event; no easy way around this
if isinstance(event, bb.event.BuildStarted):
- buildinfohelper.store_started_build(event)
+ buildinfohelper.store_started_build(event, consolelogfile)
if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)):
buildinfohelper.update_and_store_task(event)