summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index c09955157a..87e03e7c61 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -146,7 +146,7 @@ class ORMWrapper(object):
146 prj = Project.objects.get(pk = project_id) 146 prj = Project.objects.get(pk = project_id)
147 147
148 else: # this build was triggered by a legacy system, or command line interactive mode 148 else: # this build was triggered by a legacy system, or command line interactive mode
149 prj = Project.objects.get_default_project() 149 prj = Project.objects.get_or_create_default_project()
150 logger.debug(1, "buildinfohelper: project is not specified, defaulting to %s" % prj) 150 logger.debug(1, "buildinfohelper: project is not specified, defaulting to %s" % prj)
151 151
152 152
@@ -308,6 +308,11 @@ class ORMWrapper(object):
308 # then we are wholly responsible for the data 308 # then we are wholly responsible for the data
309 # and therefore we return the 'real' recipe rather than the build 309 # and therefore we return the 'real' recipe rather than the build
310 # history copy of the recipe. 310 # history copy of the recipe.
311 if recipe_information['layer_version'].build is not None and \
312 recipe_information['layer_version'].build.project == \
313 Project.objects.get_or_create_default_project():
314 return recipe
315
311 if built_recipe is None: 316 if built_recipe is None:
312 return recipe 317 return recipe
313 318
@@ -345,7 +350,7 @@ class ORMWrapper(object):
345 # If we're doing a command line build then associate this new layer with the 350 # If we're doing a command line build then associate this new layer with the
346 # project to avoid it 'contaminating' toaster data 351 # project to avoid it 'contaminating' toaster data
347 project = None 352 project = None
348 if build_obj.project == Project.objects.get_default_project(): 353 if build_obj.project == Project.objects.get_or_create_default_project():
349 project = build_obj.project 354 project = build_obj.project
350 355
351 layer_version_object, _ = Layer_Version.objects.get_or_create( 356 layer_version_object, _ = Layer_Version.objects.get_or_create(