CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#1552 - pkgmk: default JOBS=nproc

Attached to Project: CRUX
Opened by Fun (fun) - Sunday, 07 January 2018, 22:10 GMT
Last edited by Predrag Ivanovic (pedja) - Monday, 18 March 2019, 15:02 GMT
Task Type Improvement
Category tools → pkgutils
Status New
Assigned To CRUX Developers (crux)
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Currently, 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

Comment by Fun (fun) - Sunday, 07 January 2018, 22:42 GMT
and the patch...
Comment by Juergen Daubert (jue) - Monday, 08 January 2018, 08:35 GMT
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.
Comment by Fun (fun) - Monday, 08 January 2018, 19:52 GMT
Nice. I didn't thought of setting JOBS in /usr/bin/pkgmk. I attach one patch for JOBS=1 and one for JOBS=$(nproc).

Loading...