Created attachment 317470 [details] build.log Steps to reproduce: 1: Set $MAKEOPTS as follows. (a) MAKEOPTS="-j" (short option without a number. In general, combined with -l, --load-average, --max-load) (b) MAKEOPTS="--jobs=n" (GNU style long option, with or without an argument) 2: emerge =app-i18n/ibus-mozc-1.5.1090.102 Actual Results: emerge failed due to following errror. build_mozc.py: error: -j option requires an argument Problematic codes in src_compile() are follows, those codes cannot parse properly the $MAKEOPTS such like above. local myjobs=`expr match "${MAKEOPTS}" '.*\(-j[0-9]*\)'` test -z "${myjobs}" && myjobs="-j1"
Created attachment 317472 [details, diff] Proposed patch for ibus-mozc-1.5.1090.102.ebuild This patch is not a perfect. When users set the MAKEOPTS as follow, MAKEOPTS="--jobs=FAIRLY_HIGH_NUMBER --max-load=AS_HE_LIKE" such settings will cause overloads while building ibus-mozc. But IMO, it would be a really rare case...
Comment on attachment 317472 [details, diff] Proposed patch for ibus-mozc-1.5.1090.102.ebuild Er, so you want to test in one ebuild in the whole tree whether the sysadmin has set a proper MAKEOPTS? I don't think this will save the world.
Comment on attachment 317472 [details, diff] Proposed patch for ibus-mozc-1.5.1090.102.ebuild Oh wait, that check is already in place?!
OK, I will clarify my purpose. (1) -j without a number, such like MAKEOPTS="-j -l5.0" I think such settings are good to be supported. ibus-mozc's build system cannot control jobs by load average, so it should be "-j1" as a fallback. (2) GNU style long option, such like MAKEOPTS="--jobs=5" or "--jobs --max-load=5.0" I think such settings are good to be supported. (3) Combined "-j with a number" and "-l", such like MAKEOPTS="-j256 -l5.0" I _don't_ think such settings are needed to be supported by all ebuilds in the tree. (1) and (2) are not supported by in-tree ebuild. My patch supports them. At (3), both of in-tree ebuild and my patch can work with, but results will be uncertain. I think we can simply ignore this rare case. Thanks.
Patch applied. Thanks.