Gentoo Archives: gentoo-dev

From: Mike Pagano <mpagano@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH 1/1] linux-info.eclass: Add /proc/config.gz as a valid src of CONFIG_* settings
Date: Sun, 15 Jan 2023 17:40:21
Message-Id: dbffaf2e-9821-d26e-f3eb-ea317790d9f7@gentoo.org
1 In the event that the linux src tree does not have
2 a valid .config, check for /proc/config.gz
3
4 Bug: https://bugs.gentoo.org/890720
5
6 Signed-off-by: Mike Pagano <mpagano@g.o>
7 ---
8 eclass/linux-info.eclass | 12 ++++++++++--
9 1 file changed, 10 insertions(+), 2 deletions(-)
10
11 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
12 index 16ef69ebc..daedd758f 100644
13 --- a/eclass/linux-info.eclass
14 +++ b/eclass/linux-info.eclass
15 @@ -301,10 +301,18 @@ linux_config_qa_check() {
16 # @FUNCTION: linux_config_src_exists
17 # @RETURN: true or false
18 # @DESCRIPTION:
19 -# It returns true if .config exists in a build directory otherwise false
20 +# Returns true if either .config exists in a build directory or
21 +# /proc/config.gz is found, otherwise returns false
22 linux_config_src_exists() {
23 export _LINUX_CONFIG_EXISTS_DONE=1
24 - use kernel_linux && [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
25 + if use kernel_linux; then
26 + if [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]; then
27 + return 0
28 + elif linux_config_bin_exists; then
29 + return 0
30 + fi
31 + fi
32 + return 1
33 }
34
35 # @FUNCTION: linux_config_bin_exists
36 --
37 2.38.2
38
39
40 --
41 Mike Pagano
42 Gentoo Developer - Kernel Project
43 E-Mail : mpagano@g.o
44 GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
45 Public Key : http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index

Replies