summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-03-08 17:26:09 +0100
committerMichał Górny <mgorny@gentoo.org>2018-07-09 18:54:47 +0200
commit347a16aeb2fbf8872ae0c2a4e9ce8d61ed000796 (patch)
tree030ab8afd4474219bebcda257293229a30c98fe0 /eclass/linux-info.eclass
parentlinux-info.eclass: Die in most of public-ish APIs on non-Linux (diff)
downloadgentoo-347a16aeb2fbf8872ae0c2a4e9ce8d61ed000796.tar.gz
gentoo-347a16aeb2fbf8872ae0c2a4e9ce8d61ed000796.tar.bz2
gentoo-347a16aeb2fbf8872ae0c2a4e9ce8d61ed000796.zip
linux-info.eclass: Skip linux_config_*_exists on non-Linux
The linux_config_src_exists and linux_config_bin_exists always return false on non-Linux systems by design. Short-circuit it via 'kernel_linux' check.
Diffstat (limited to 'eclass/linux-info.eclass')
-rw-r--r--eclass/linux-info.eclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 2ddc9e03e890..77df7a6ad609 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -252,7 +252,7 @@ linux_config_qa_check() {
# It returns true if .config exists in a build directory otherwise false
linux_config_src_exists() {
export _LINUX_CONFIG_EXISTS_DONE=1
- [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
+ use kernel_linux && [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
}
# @FUNCTION: linux_config_bin_exists
@@ -261,7 +261,7 @@ linux_config_src_exists() {
# It returns true if .config exists in /proc, otherwise false
linux_config_bin_exists() {
export _LINUX_CONFIG_EXISTS_DONE=1
- [[ -s /proc/config.gz ]]
+ use kernel_linux && [[ -s /proc/config.gz ]]
}
# @FUNCTION: linux_config_exists