bitbake: ui/buildinfohelper: Add exception treatment to fix missing target_file

Based on the discution on  https://lists.yoctoproject.org/g/toaster/message/6157
in some cases the value for Target_file could be missing and is needed to bypass
it to finish build.

(Bitbake rev: c60f6d20911632b41473f7c8577949be2f99ad80)

Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Marlon Rodriguez Garcia
2024-05-23 10:55:41 -04:00
committed by Richard Purdie
parent ae589a1e37
commit 1d86845c41

View File

@@ -559,7 +559,10 @@ class ORMWrapper(object):
# we might have an invalid link; no way to detect this. just set it to None
filetarget_obj = None
parent_obj = Target_File.objects.get(target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
try:
parent_obj = Target_File.objects.get(target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
except Target_File.DoesNotExist:
parent_obj = None
Target_File.objects.create(
target = target_obj,