Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 373151 - linux-info.eclass: getfilevar: use 'emake', not 'make' when invoking make to parse definitions from kernel Makefile
Summary: linux-info.eclass: getfilevar: use 'emake', not 'make' when invoking make to ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Kernel Miscellaneous
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-26 20:18 UTC by Kevin Pyle
Modified: 2013-02-10 06:18 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Pyle 2011-06-26 20:18:19 UTC
As part of an effort to find and eliminate direct calls to 'make', I devised a function in /etc/portage/bashrc that shadows make, prints a warning, then calls the real one (or calls emake, depending on the exact goal).  However, this also catches uses of make that happen to be safe, such as the one in linux-info.eclass, where getfilevar invokes make to parse the kernel Makefile and print data produced from it.  By changing getfilevar to use emake, this warning can be avoided, making it easier to see if an ebuild that includes linux-info also uses make in an improper manner.  For users who do not have the shadowing helper function, this change will only have the effect of passing their MAKEOPTS to the temporary make, which should be harmless.

This shadow function premiered in bug #226789, but I have not been aggressive about pushing its use elsewhere.  (Although, Diego did promptly incorporate it into his tinderbox. :)  If you want to use it, it is available as bug #226789, comment #7; a slightly newer version is shown here.

    make() {
        eqawarn "Local QA notice: 'make' called by ${FUNCNAME[1]}:              $CATEGORY/$PF"
        # Derived from die()'s stack tracer
        _local_dump_trace eqawarn 1
        emake -j1 "$@"
    }
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-07-01 07:25:24 UTC
There is a problem. emake invokes helpers_die on failure, which pollutes the output or dies entirely, which we don't want.
Comment 2 Kevin Pyle 2011-07-01 22:38:04 UTC
I see that in the presently installed amd64 Portage, but I do not recall seeing that there when I wrote the emake shadow.  Even so, my version which chains to emake does not seem to induce failures when building on systems with no kernel sources available.  I usually only make sources available if an ebuild absolutely refuses to proceed without a configured kernel.  I recently successfully built udev-164-r2, which uses linux-info.eclass and thus triggered the warnings that prompted me to file this enhancement request.
Comment 3 SpanKY gentoo-dev 2013-02-10 06:18:44 UTC
we can [ab]use nonfatal to avoid the noise issue

http://sources.gentoo.org/eclass/linux-info.eclass?r1=1.97&r2=1.98