From 2f73e048f4c642f4ad9b1ab821146e78a16a86f1 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 41a5e1198a95a0..8c1fc35c792b38 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