summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Jörns <ejo@pengutronix.de>2024-06-04 10:06:21 +0200
committerSteve Sakoman <steve@sakoman.com>2024-08-01 06:08:09 -0700
commita9517d232ef74af25083cb340240541da23a48e0 (patch)
tree152666a0428e8c9e0d2bd655fbfa07ea3dccd32b
parent062d897b77bcb138654c5b1526ccbc5774246453 (diff)
downloadpoky-a9517d232ef74af25083cb340240541da23a48e0.tar.gz
wic: bootimg-efi: fix error handling
If we check for empty variables, it does not make sense to print their content in case they are empty. Additionally, the error message in the 'kernel' check attempted to print the wrong variable ('target') which was not even defined, yet. Also, raising WicError doesn't require an extra newline. (From OE-Core rev: a1cbf4d5ea5f852144d0cc70be99d6338c618fcd) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f31cf475d0235f42d73aeec07694f79b9937fd76) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 13a9cddf4e..7cc5131541 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -428,10 +428,10 @@ class BootimgEFIPlugin(SourcePlugin):
428 elif source_params['loader'] == 'uefi-kernel': 428 elif source_params['loader'] == 'uefi-kernel':
429 kernel = get_bitbake_var("KERNEL_IMAGETYPE") 429 kernel = get_bitbake_var("KERNEL_IMAGETYPE")
430 if not kernel: 430 if not kernel:
431 raise WicError("Empty KERNEL_IMAGETYPE %s\n" % target) 431 raise WicError("Empty KERNEL_IMAGETYPE")
432 target = get_bitbake_var("TARGET_SYS") 432 target = get_bitbake_var("TARGET_SYS")
433 if not target: 433 if not target:
434 raise WicError("Unknown arch (TARGET_SYS) %s\n" % target) 434 raise WicError("Empty TARGET_SYS")
435 435
436 if re.match("x86_64", target): 436 if re.match("x86_64", target):
437 kernel_efi_image = "bootx64.efi" 437 kernel_efi_image = "bootx64.efi"