Skip to contentSkip to conversation

toaster: buildinfohelper Create target list for all types of build

PATCH In review Elliot Smith 2 participants 2 messages Apr 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: buildinfohelper Create target list for all types of build

From: Michael Wood <[email protected]>

Create the target list cache for command line builds and toaster triggered builds. This fixes a regression where the target is not identified as an image after building as the target cache is empty for toaster triggered builds

[YOCTO #9266]

---
 bitbake/lib/bb/ui/buildinfohelper.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
bitbake/lib/bb/ui/buildinfohelper.py +8 -7
index 9021c63..7b8b1a5 100644
@@ -977,15 +977,16 @@ class BuildInfoHelper(object):
         event: a TargetsAcquired event with a task property (e.g. "build")
         and a targetsList property (e.g. ["zlib", "dropbear"])
         """
-        if self.internal_state['build'].project.is_default:
-            targets = map(lambda target: target + ':' + event.task, event.targetsList)
+        targets = map(lambda target: target + ':' + event.task,
+                      event.targetsList)
 
-            target_information = {
-              'targets': targets,
-              'build': self.internal_state['build']
-            }
+        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):
         """
Signature · 12 lines
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#1 lore raw
Quoted 33 lines · Elliot Smith

From: Michael Wood <[email protected]>

Create the target list cache for command line builds and toaster triggered builds. This fixes a regression where the target is not identified as an image after building as the target cache is empty for toaster triggered builds

[YOCTO #9266]

---
  bitbake/lib/bb/ui/buildinfohelper.py | 15 ++++++++-------
  1 file changed, 8 insertions(+), 7 deletions(-)
bitbake/lib/bb/ui/buildinfohelper.py +3 -6
index 9021c63..7b8b1a5 100644
@@ -977,15 +977,16 @@ class BuildInfoHelper(object):
          event: a TargetsAcquired event with a task property (e.g. "build")
          and a targetsList property (e.g. ["zlib", "dropbear"])
          """
-        if self.internal_state['build'].project.is_default:
-            targets = map(lambda target: target + ':' + event.task, event.targetsList)
+        targets = map(lambda target: target + ':' + event.task,
+                      event.targetsList)
 
-            target_information = {
-              'targets': targets,
-              'build': self.internal_state['build']
-            }
+        target_information = {

bitbake/lib/bb/ui/buildinfohelper.py class BuildInfoHelper(object): · line 992

Quoted 10 lines
bitbake/lib/bb/ui/buildinfohelper.py +5 -1
+            '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):
          """

This patch depends on:

10/03/16 13:57 - [PATCH] toaster: create Build object earlier in bitbake processing