diff options
author | Elliot Smith <elliot.smith@intel.com> | 2015-09-11 13:57:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-18 09:05:33 +0100 |
commit | 8c63d6049d221da0c5211f847ddf13e0e45dd459 (patch) | |
tree | bb232d14ffd21023902413797d33274e18d8dbc2 /bitbake/lib/bb | |
parent | 013c030c42710e1779167cc90a675b26caa377e6 (diff) | |
download | poky-8c63d6049d221da0c5211f847ddf13e0e45dd459.tar.gz |
bitbake: 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]
(Bitbake rev: 20609eebee0d2318806cf81913e7ce6dc1005507)
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>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 8 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 2d1ed51116..6e313fee8b 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -704,7 +704,7 @@ class BuildInfoHelper(object): | |||
704 | ## methods to convert event/external info into objects that the ORM layer uses | 704 | ## methods to convert event/external info into objects that the ORM layer uses |
705 | 705 | ||
706 | 706 | ||
707 | def _get_build_information(self): | 707 | def _get_build_information(self, consolelogfile): |
708 | build_info = {} | 708 | build_info = {} |
709 | # Generate an identifier for each new build | 709 | # Generate an identifier for each new build |
710 | 710 | ||
@@ -713,7 +713,7 @@ class BuildInfoHelper(object): | |||
713 | build_info['distro_version'] = self.server.runCommand(["getVariable", "DISTRO_VERSION"])[0] | 713 | build_info['distro_version'] = self.server.runCommand(["getVariable", "DISTRO_VERSION"])[0] |
714 | build_info['started_on'] = timezone.now() | 714 | build_info['started_on'] = timezone.now() |
715 | build_info['completed_on'] = timezone.now() | 715 | build_info['completed_on'] = timezone.now() |
716 | build_info['cooker_log_path'] = self.server.runCommand(["getVariable", "BB_CONSOLELOG"])[0] | 716 | build_info['cooker_log_path'] = consolelogfile |
717 | build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0] | 717 | build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0] |
718 | build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0] | 718 | build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0] |
719 | 719 | ||
@@ -847,9 +847,9 @@ class BuildInfoHelper(object): | |||
847 | logger.warn("buildinfohelper: cannot identify layer exception:%s ", nee) | 847 | logger.warn("buildinfohelper: cannot identify layer exception:%s ", nee) |
848 | 848 | ||
849 | 849 | ||
850 | def store_started_build(self, event): | 850 | def store_started_build(self, event, consolelogfile): |
851 | assert '_pkgs' in vars(event) | 851 | assert '_pkgs' in vars(event) |
852 | build_information = self._get_build_information() | 852 | build_information = self._get_build_information(consolelogfile) |
853 | 853 | ||
854 | build_obj = self.orm_wrapper.create_build_object(build_information, self.brbe, self.project) | 854 | build_obj = self.orm_wrapper.create_build_object(build_information, self.brbe, self.project) |
855 | 855 | ||
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index 9c7e87dd1e..e0c278bb3e 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py | |||
@@ -126,7 +126,7 @@ def main(server, eventHandler, params ): | |||
126 | # the code will look into the protected variables of the event; no easy way around this | 126 | # the code will look into the protected variables of the event; no easy way around this |
127 | 127 | ||
128 | if isinstance(event, bb.event.BuildStarted): | 128 | if isinstance(event, bb.event.BuildStarted): |
129 | buildinfohelper.store_started_build(event) | 129 | buildinfohelper.store_started_build(event, consolelogfile) |
130 | 130 | ||
131 | if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)): | 131 | if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)): |
132 | buildinfohelper.update_and_store_task(event) | 132 | buildinfohelper.update_and_store_task(event) |