From 959ad2a7bc38765018292a01a54a94f699037573 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Mon, 13 Nov 2023 19:10:03 -0800 Subject: [PATCH] image: don't mask imagesize failures On a failed image-size check, Build/check-size currently prints an error message, removes the offending build file, and returns success to the build system, which is problematic for a few reasons. Returning success lets the overall build complete without flagging the error, unless a user happens to search through logs. It also allows subsequent build steps to run, which can fail in various ways due to the target file's removal, and result in broken image files (e.g. only a header/footer present). Update check-size to return failure as needed to avoid these problems. Signed-off-by: Tony Ambardar --- include/image-commands.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/image-commands.mk b/include/image-commands.mk index c9c5f9c5fc7ffd..b54dccdd9f796f 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -223,6 +223,7 @@ define Build/check-size [ $$limitsize -ge $$imagesize ] || { \ $(call ERROR_MESSAGE, WARNING: Image file $@ is too big: $$imagesize > $$limitsize); \ rm -f $@; \ + false; \ } endef