Hi Marlon, The patch looks good. Thank you for fixing this edge case.
David -----Original Message----- From: [email protected] <[email protected]> On Behalf Of Marlon Rodriguez Garcia via lists.yoctoproject.org Sent: Thursday, May 23, 2024 7:56 AM To: [email protected]; [email protected] Cc: Marlon Rodriguez Garcia <[email protected]> Subject: [Toaster] [PATCH] 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 Signed-off-by: Marlon Rodriguez Garcia <[email protected]> --- lib/bb/ui/buildinfohelper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py index 8b212b780..4ee45d67a 100644 --- a/lib/bb/ui/buildinfohelper.py +++ b/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, -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#6160): https://lists.yoctoproject.org/g/toaster/message/6160 Mute This Topic: https://lists.yoctoproject.org/mt/106263840/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/toaster/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
