File 0002-image-do-not-override-image-variable-if-set.patch of Package sdbootutil

From c1067f6c614ede9e649b31e08b745dbfec593f7b Mon Sep 17 00:00:00 2001
From: Valentin Lefebvre <valentin.lefebvre@suse.com>
Date: Thu, 29 Feb 2024 19:27:27 +0100
Subject: [PATCH 2/2] image: do not override image variable if set

Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
---
 sdbootutil | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sdbootutil b/sdbootutil
index 747f067..1242180 100755
--- a/sdbootutil
+++ b/sdbootutil
@@ -671,6 +671,9 @@ install_uki()
 	local subvol="$1"
 	local kernel_version="$2" # Same as kernel version
 	local src="${subvol#${subvol_prefix}}/lib/modules/$kernel_version/uki.efi"
+    if [ "$image" = "vmlinuz" ] || [ "$image" = "Image" ]; then
+        err "When adding UKI provide the uki image name \"--image\""
+    fi
 	test -e "$src" || err "Can't find $src"
 
 	# According uapi group, uki name should contain version.
-- 
2.45.2

openSUSE Build Service is sponsored by