commit:     4f4688ebfaada63f1e5f6a108038c98ed140b082
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 18 19:14:48 2021 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Mon Oct 18 19:14:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f4688eb

linux-info.eclass: add --no-print-directory to emake

Thanks to Jocelyn Mayer for the report and the patch.

When MAKEOPTS contains '-w' or '--print-directory',
getfilevar echoed value contains make: Entering directory
'xxx' and make: Leaving directory 'xxx' which result in
a wrong multiline version string thus making kernel
versions comparisons always fail.

Closes: https://bugs.gentoo.org/816888

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 eclass/linux-info.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 9eae5ad589b..568f7a1a283 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -208,7 +208,7 @@ getfilevar() {
                # Pass dot-config=0 to avoid the config check in kernels prior 
to 5.4.
                [[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; }
                echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
-                       nonfatal emake -C "${basedname}" M="${T}" dot-config=0 
need-config= ${BUILD_FIXES} -s -f - 2>/dev/null
+                       nonfatal emake -C "${basedname}" --no-print-directory 
M="${T}" dot-config=0 need-config= ${BUILD_FIXES} -s -f - 2>/dev/null
 
                ARCH=${myARCH}
        fi

Reply via email to