Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-firmware/
Date: Sat, 18 Mar 2023 14:58:24
Message-Id: 1679151063.b5f6b85b5d1516749d2a310746b6b460de266d30.mpagano@gentoo
1 commit: b5f6b85b5d1516749d2a310746b6b460de266d30
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 18 14:51:03 2023 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 18 14:51:03 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5f6b85b
7
8 sys-kernel/linux-firmware: fix kernel config checking for -99999999
9
10 Remove the ! linux_config_exists check because the function will
11 always fail when /proc/config.gz support is not enabled because
12 KV_OUT_DIR needed by linux_config_src_exists is not populated yet
13
14 die if USE=compress-zstd is set with an unsupported kernel
15 Thanks to xxc3nsoredxx
16
17 Bug: https://bugs.gentoo.org/899958
18
19 Author: xxc2ensoredxx
20 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
21
22 .../linux-firmware/linux-firmware-99999999.ebuild | 22 +++++++++-------------
23 1 file changed, 9 insertions(+), 13 deletions(-)
24
25 diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild
26 index 47424bcb967c..feed015c3e3e 100644
27 --- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild
28 +++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild
29 @@ -65,22 +65,18 @@ QA_PREBUILT="*"
30
31 pkg_setup() {
32 if use compress-xz || use compress-zstd ; then
33 - if ! linux_config_exists; then
34 - eerror "Unable to check your kernel for compressed firmware support"
35 + local CONFIG_CHECK
36 +
37 + if kernel_is -ge 5 19; then
38 + use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS_XZ"
39 + use compress-zstd && CONFIG_CHECK="~FW_LOADER_COMPRESS_ZSTD"
40 else
41 - local CONFIG_CHECK
42 -
43 - if kernel_is -ge 5 19; then
44 - use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS_XZ"
45 - use compress-zstd && CONFIG_CHECK="~FW_LOADER_COMPRESS_ZSTD"
46 - else
47 - use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS"
48 - if use compress-zstd; then
49 - eerror "You kernel does not support ZSTD-compressed firmware files"
50 - fi
51 + use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS"
52 + if use compress-zstd; then
53 + eerror "Kernels <5.19 do not support ZSTD-compressed firmware files"
54 fi
55 - linux-info_pkg_setup
56 fi
57 + linux-info_pkg_setup
58 fi
59 }