Welcome to CRUX bug tracking.
FS#1552 - pkgmk: default JOBS=nproc
Attached to Project:
CRUX
Opened by Fun (fun) - Sunday, 07 January 2018, 22:10 GMT
Last edited by Tim Biermann (tb) - Saturday, 12 March 2022, 09:07 GMT
Opened by Fun (fun) - Sunday, 07 January 2018, 22:10 GMT
Last edited by Tim Biermann (tb) - Saturday, 12 March 2022, 09:07 GMT
|
DetailsCurrently, we use {JOBS:-1} in Pkgfiles, which is a downgrade from the default behavior, because the ports using ninja (and maybe others, firefox for example, from what I remember) are built with parallel jobs if "-j" is not supplied.
Not to mention that JOBS is used in ports where the build time matters and where the build system/file supports parallel jobs: firefox, boost, webkit, chromium, samba. Having "export JOBS=$(nproc)" by default in pkgmk.conf should be a good thing for most of us (faster builds with ports using JOBS), and when the memory is scarce or the system is not properly cooled, the user can set JOBS to a lower value. Of course, there is the choice to change ${JOBS:-1} to ${JOBS:-$(nproc)} in ports, and leave the pkgmk.conf file untouched, but I think enforcing JOBS to be set in pkgmk.conf to any positive value and use just "$JOBS" in ports where it matters is better. |
This task depends upon
Closed by Tim Biermann (tb)
Saturday, 12 March 2022, 09:07 GMT
Reason for closing: Won't implement
Additional comments about closing: This issue has stalled and nobody else took interest in it, closing
Saturday, 12 March 2022, 09:07 GMT
Reason for closing: Won't implement
Additional comments about closing: This issue has stalled and nobody else took interest in it, closing

and the patch...

If we use $JOBS unconditionally in Pkgfile's we should consider to set the default to 1 in /usr/bin/pkgmk. This avoids a build break if JOBS is not defined in pkgmk.conf, meaning commented out by the user.

Nice. I didn't thought of setting JOBS in /usr/bin/pkgmk. I attach one patch for JOBS=1 and one for JOBS=$(nproc).

I think this is perfectly fine to leave with what we have, maybe we need to promote that option more in the handbook to get new users aware of it... but that should be it?