In the event that the linux src tree does not have
a valid .config, check for /proc/config.gz

Bug: https://bugs.gentoo.org/890720

Signed-off-by: Mike Pagano <mpag...@gentoo.org>
---
 eclass/linux-info.eclass | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 16ef69ebc..daedd758f 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -301,10 +301,18 @@ linux_config_qa_check() {
 # @FUNCTION: linux_config_src_exists
 # @RETURN: true or false
 # @DESCRIPTION:
-# It returns true if .config exists in a build directory otherwise false
+# Returns true if either .config exists in a build directory or
+# /proc/config.gz is found, otherwise returns false
 linux_config_src_exists() {
        export _LINUX_CONFIG_EXISTS_DONE=1
-       use kernel_linux && [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
+       if use kernel_linux; then
+               if [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]; then
+                       return 0
+               elif linux_config_bin_exists; then
+                       return 0
+               fi
+       fi
+       return 1
 }
# @FUNCTION: linux_config_bin_exists
--
2.38.2


--
Mike Pagano
Gentoo Developer - Kernel Project
E-Mail     : mpag...@gentoo.org
GnuPG FP   : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
Public Key : http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index

Reply via email to