This might be a systemd 259 change, but not sure. In any case we can now get a kernel image with padding that does verify. So let's check the exit code of sbverify before we do any trimming. If sbverify was successful then reset the variable where we are checking for an error from sbverify and continue.
Signed-off-by: Nowa Ammerlaan <[email protected]> --- eclass/kernel-install.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index 12ad0dcbe091..a879c72310f3 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -1,4 +1,4 @@ -# Copyright 2020-2025 Gentoo Authors +# Copyright 2020-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: kernel-install.eclass @@ -692,7 +692,9 @@ kernel-install_extract_from_uki() { ) # Check if there was a padding warning - if [[ ${sbverify_err} == "warning: data remaining"*": gaps between PE/COFF sections?"* ]] + if [[ ${?} -eq 0 ]]; then + sbverify_err= + elif [[ ${sbverify_err} == "warning: data remaining"*": gaps between PE/COFF sections?"* ]] then # https://github.com/systemd/systemd/issues/35851 local proper_size=${sbverify_err#"warning: data remaining["} -- 2.52.0
