Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 816888 - eclass/linux-info.eclass: getfilevar incorrect return when MAKEOPTS contains '-w' or '--print-directory'
Summary: eclass/linux-info.eclass: getfilevar incorrect return when MAKEOPTS contains ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-07 21:55 UTC by Jocelyn Mayer
Modified: 2021-10-18 19:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel versions compare failure example (libnetfilter_conntrack-1.0.8:20211004-203531.log,4.03 KB, text/x-log)
2021-10-07 21:55 UTC, Jocelyn Mayer
Details
'emerge --info' output (emerge_infos,22.24 KB, text/plain)
2021-10-07 21:57 UTC, Jocelyn Mayer
Details
Patch solving the problem (at least in my case) (linux-info.eclass.patch,601 bytes, patch)
2021-10-07 22:00 UTC, Jocelyn Mayer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Mayer 2021-10-07 21:55:47 UTC
Created attachment 743808 [details]
Kernel versions compare failure example

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.

This bug can be solved by adding '--no-print-directory' option to emake call inside getfilevar function from linux-info eclass.
Comment 1 Jocelyn Mayer 2021-10-07 21:57:41 UTC
Created attachment 743811 [details]
'emerge --info' output
Comment 2 Jocelyn Mayer 2021-10-07 22:00:26 UTC
Created attachment 743814 [details, diff]
Patch solving the problem (at least in my case)
Comment 3 Jocelyn Mayer 2021-10-07 22:04:57 UTC
this problem have been seen with at least 2 machines, all amd64, the second one been a Ryzen 5, used as a development desktop computer, as the first one runs as a server with a limited and hardened configuration (no display support, ...).
Comment 4 Larry the Git Cow gentoo-dev 2021-10-18 19:16:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f4688ebfaada63f1e5f6a108038c98ed140b082

commit 4f4688ebfaada63f1e5f6a108038c98ed140b082
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2021-10-18 19:14:48 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2021-10-18 19:14:48 +0000

    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>

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