Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 425144 - app-i18n/ibus-mozc-1.5.1090.102 - build_mozc.py: error: -j option requires an argument
Summary: app-i18n/ibus-mozc-1.5.1090.102 - build_mozc.py: error: -j option requires an...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-07-07 09:13 UTC by Tomoh K.
Modified: 2012-07-10 07:33 UTC (History)
0 users

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


Attachments
build.log (app-i18n:ibus-mozc-1.5.1090.102:20120706-033625.log,7.05 KB, text/plain)
2012-07-07 09:13 UTC, Tomoh K.
Details
Proposed patch for ibus-mozc-1.5.1090.102.ebuild (ibus-mozc-1.5.1090.102.ebuild.patch,816 bytes, patch)
2012-07-07 09:18 UTC, Tomoh K.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoh K. 2012-07-07 09:13:21 UTC
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"
Comment 1 Tomoh K. 2012-07-07 09:18:19 UTC
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 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-07-09 01:15:13 UTC
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 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-07-09 01:20:26 UTC
Comment on attachment 317472 [details, diff]
Proposed patch for ibus-mozc-1.5.1090.102.ebuild

Oh wait, that check is already in place?!
Comment 4 Tomoh K. 2012-07-09 06:48:03 UTC
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.
Comment 5 Naohiro Aota gentoo-dev 2012-07-10 07:33:45 UTC
Patch applied. Thanks.