I set the MAKEOPTS env variable through environment, not using make.conf.
And I'm emerging LOTS of programs (in fact, I'm using catalyst).
the script "emerge" calls 'ebuild.sh' (I saw the lines in portage.py file) for merging each file. So, I think that "ebuild.sh" processes should ALWAYS have the "MAKEOPTS" env variable set as it was when "emerge" was called.
The only function I've found which changes MAKEOPTS is "get_number_of_jobs" in 'eutils.eclass' file, called by 'ebuild.sh', called by 'emerge'.
I added an echo line at start of 'ebuild.sh' which shows the content of MAKEOPTS variable. And BECAUSE OF SOMETHING I don't know, the contents of MAKEOPTS is "-j2" (the contents of MAKEOPTS variable before running emerge was "-j6").
ebuild.sh inherits that variable from the python script 'emerge', isn't it? and ebuild.sh cannot change the content of that variable of the 'emerge' process. So, what happened?
I cannot catch when the calls to 'ebuild.sh' begin to use -j2 and not my set -j6.
I added "MAKEOPTS=-j6" at start of ebuild.sh as a temporary solution.
Am I completely wrong in something? Am I missing something? Is the explanation clear enough?
Steps to Reproduce:
Emerge a lot of packages, as catalyst does with grp building.
please narrow down how you reproduce this
some ebuilds actually override MAKEOPTS themselves (there are bugs open to handle that)
i'm not even sure what your bug is here ... are you saying that if one ebuild changes MAKEOPTS, all the other packages in the same emerge process are affected ?
what does catalyst have to do with this ?
Oh... I found the solution to this. That was a catalyst bug.