From 1d86845c4132df7cac9ed63bd1ccb86a6ec8b4d5 Mon Sep 17 00:00:00 2001 From: Marlon Rodriguez Garcia Date: Thu, 23 May 2024 10:55:41 -0400 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/buildinfohelper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 8b212b7803..4ee45d67a2 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -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, -- cgit v1.2.3-54-g00ecf