From c5364e6d4ed1ea9216a6661b6497b2be1a4e4287 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 22 Jul 2024 19:34:19 +0100 Subject: [PATCH] rom.sh: fix buggy deletion of cbutils when badhash=y, the utils should be deleted, but the check is deleting if badhash isn't n. if the hash check isn't being performed, then this will always be the case and the utils are always deleted. make it positively delete the file only if badhash=y, not when it isn't n. while this may not sound very different, it will prevent the utils being deleted and re-build endlessly in other cases, like when building release archives and running the inject --nuke mode on every image that gets built. Signed-off-by: Leah Rowe --- include/rom.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/rom.sh b/include/rom.sh index 29741df..6020614 100644 --- a/include/rom.sh +++ b/include/rom.sh @@ -60,8 +60,7 @@ cook_coreboot_config() check_coreboot_utils() { for util in cbfstool ifdtool; do - [ "$badhash" = "n" ] || rm -f "elf/$util/$1/$util" || \ - $err "!rm badelf elf/$util/$1/$util" + [ "$badhash" = "y" ] && x_ rm -f "elf/$util/$1/$util" e "elf/$util/$1/$util" f && continue utilelfdir="elf/$util/$1"