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@gentoo.org>
This commit is contained in:
Mike Pagano
2021-10-18 15:14:48 -04:00
parent fe98496f67
commit 4f4688ebfa

View File

@@ -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