Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 09 Jul 2018 16:55:02
Message-Id: 1531155287.347a16aeb2fbf8872ae0c2a4e9ce8d61ed000796.mgorny@gentoo
1 commit: 347a16aeb2fbf8872ae0c2a4e9ce8d61ed000796
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 8 16:26:09 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 9 16:54:47 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=347a16ae
7
8 linux-info.eclass: Skip linux_config_*_exists on non-Linux
9
10 The linux_config_src_exists and linux_config_bin_exists always return
11 false on non-Linux systems by design. Short-circuit it via
12 'kernel_linux' check.
13
14 eclass/linux-info.eclass | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
18 index 2ddc9e03e89..77df7a6ad60 100644
19 --- a/eclass/linux-info.eclass
20 +++ b/eclass/linux-info.eclass
21 @@ -252,7 +252,7 @@ linux_config_qa_check() {
22 # It returns true if .config exists in a build directory otherwise false
23 linux_config_src_exists() {
24 export _LINUX_CONFIG_EXISTS_DONE=1
25 - [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
26 + use kernel_linux && [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
27 }
28
29 # @FUNCTION: linux_config_bin_exists
30 @@ -261,7 +261,7 @@ linux_config_src_exists() {
31 # It returns true if .config exists in /proc, otherwise false
32 linux_config_bin_exists() {
33 export _LINUX_CONFIG_EXISTS_DONE=1
34 - [[ -s /proc/config.gz ]]
35 + use kernel_linux && [[ -s /proc/config.gz ]]
36 }
37
38 # @FUNCTION: linux_config_exists