diff options
author | Mike Pagano <mpagano@gentoo.org> | 2023-03-18 10:51:03 -0400 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2023-03-18 10:51:03 -0400 |
commit | b5f6b85b5d1516749d2a310746b6b460de266d30 (patch) | |
tree | bcccf92322674335c62358db49e7810af7cd121d /sys-kernel | |
parent | dev-python/flask: Stabilize 2.2.3 ALLARCHES, #902011 (diff) | |
download | gentoo-b5f6b85b5d1516749d2a310746b6b460de266d30.tar.gz gentoo-b5f6b85b5d1516749d2a310746b6b460de266d30.tar.bz2 gentoo-b5f6b85b5d1516749d2a310746b6b460de266d30.zip |
sys-kernel/linux-firmware: fix kernel config checking for -99999999
Remove the ! linux_config_exists check because the function will
always fail when /proc/config.gz support is not enabled because
KV_OUT_DIR needed by linux_config_src_exists is not populated yet
die if USE=compress-zstd is set with an unsupported kernel
Thanks to xxc3nsoredxx
Bug: https://bugs.gentoo.org/899958
Author: xxc2ensoredxx
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/linux-firmware/linux-firmware-99999999.ebuild | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild index 47424bcb967c..feed015c3e3e 100644 --- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild @@ -65,22 +65,18 @@ QA_PREBUILT="*" pkg_setup() { if use compress-xz || use compress-zstd ; then - if ! linux_config_exists; then - eerror "Unable to check your kernel for compressed firmware support" + local CONFIG_CHECK + + if kernel_is -ge 5 19; then + use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS_XZ" + use compress-zstd && CONFIG_CHECK="~FW_LOADER_COMPRESS_ZSTD" else - local CONFIG_CHECK - - if kernel_is -ge 5 19; then - use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS_XZ" - use compress-zstd && CONFIG_CHECK="~FW_LOADER_COMPRESS_ZSTD" - else - use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS" - if use compress-zstd; then - eerror "You kernel does not support ZSTD-compressed firmware files" - fi + use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS" + if use compress-zstd; then + eerror "Kernels <5.19 do not support ZSTD-compressed firmware files" fi - linux-info_pkg_setup fi + linux-info_pkg_setup fi } |