summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index a5b22379aa..e1b59c3e87 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -201,6 +201,10 @@ class ORMWrapper(object):
201 201
202 @staticmethod 202 @staticmethod
203 def get_or_create_targets(target_info): 203 def get_or_create_targets(target_info):
204 """
205 NB get_or_create() is used here because for Toaster-triggered builds,
206 we already created the targets when the build was triggered.
207 """
204 result = [] 208 result = []
205 for target in target_info['targets']: 209 for target in target_info['targets']:
206 task = '' 210 task = ''
@@ -210,13 +214,10 @@ class ORMWrapper(object):
210 task = task[3:] 214 task = task[3:]
211 if task == 'build': 215 if task == 'build':
212 task = '' 216 task = ''
213 obj, created = Target.objects.get_or_create(build=target_info['build'], 217
214 target=target) 218 obj, _ = Target.objects.get_or_create(build=target_info['build'],
215 if created: 219 target=target,
216 obj.is_image = False 220 task=task)
217 if task:
218 obj.task = task
219 obj.save()
220 result.append(obj) 221 result.append(obj)
221 return result 222 return result
222 223