I gots a Summer of Code org application to write up, so you get a linkdump:
Have you ever wondered if building more than one pkgsrc package at a time can be a problem? Others have too, and apparently there’s a fix. If you don’t want to have to get to a command line to find the answer, it’s:
The type of locking that will be done if competing processes
attempt to do work on one package directory simultaneously.
* none: No locking takes place at all.
* once: When the lock has already been aquired by another
process, the current process is terminated.
* sleep: When the lock has already been acquired by another
process, the current process will sleep for PKGSRC_SLEEPSECS
seconds and then try again.
You should also set OBJHOSTNAME when you are using the same
copy of pkgsrc on different hosts, maybe via NFS. This is because the locking process writes its process ID into the lockfile, and process IDs on different hosts are unrelated.
See also: LOCALBASE_LOCKTYPE, WRKDIR_LOCKTYPE.