kernel-install.eclass: only use cert if non-empty

Apparently this file sometimes exists, but is empty, in which case we
should not try to use it.

Closes: https://bugs.gentoo.org/963425
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
This commit is contained in:
Nowa Ammerlaan
2025-09-26 12:09:20 +02:00
parent 10e0bb1d13
commit 39540973a8

View File

@@ -734,7 +734,7 @@ kernel-install_install_all() {
local module_ver
module_ver=$(<"${relfile}") || die
if [[ ! -r ${SECUREBOOT_SIGN_CERT} && -r ${kernel_cert} ]]; then
if [[ ! -r ${SECUREBOOT_SIGN_CERT} && -s ${kernel_cert} ]]; then
openssl x509 \
-inform DER -in "${kernel_cert}" \
-outform PEM -out "${T}/cert.pem" ||