diff options
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 7805086b6ad..1c97183ccbc 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -968,24 +968,27 @@ class BuildInfoHelper(object): build_information = self._get_build_information(build_log_path) self.internal_state['build'] = self.orm_wrapper.create_build_object(build_information, self.brbe) - def store_targets(self, event): + def store_targets(self, targets): """ store targets for the current build, if that build was started from the command line; targets for non-cli builds are irrelevant, as we create them from the BuildRequest anyway - event: a TargetsAcquired event with a task property (e.g. "build") - and a targetsList property (e.g. ["zlib", "dropbear"]) + targets: a list of targets for the build, e.g. + ["zlib:build", "dropbear:build"] """ - if self.internal_state['build'].project.is_default: - targets = map(lambda target: target + ':' + event.task, event.targetsList) - target_information = { - 'targets': targets, - 'build': self.internal_state['build'] - } + # non-command-line builds have their targets stored when the build + # request is created + if not self.internal_state['build'].project.is_default: + return + + target_information = { + 'targets': targets, + 'build': self.internal_state['build'] + } - self.internal_state['targets'] = self.orm_wrapper.get_or_create_targets(target_information) + self.internal_state['targets'] = self.orm_wrapper.get_or_create_targets(target_information) def update_build(self, event): """ |