diff options
author | agc <agc@pkgsrc.org> | 2002-01-19 21:29:41 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2002-01-19 21:29:41 +0000 |
commit | 22bb6a588bfb3c4b05327ccc3ffd96d538e446c5 (patch) | |
tree | 1c7f29838f14cee7e116674d22a180e6efa01a47 /mk/bsd.pkg.defaults.mk | |
parent | 36b6349ad8ad8b83193bc2de88077d8247161cec (diff) | |
download | pkgsrc-22bb6a588bfb3c4b05327ccc3ffd96d538e446c5.tar.gz |
Add coarse-grained locking to pkgsrc builds, by means of a beefed
up version of the bare-bones code in PR 7590, from David Maxwell.
The definition governing the type of locking used is PKGSRC_LOCKTYPE,
which can take any of the values "none", "sleep", and "once". The
default is "none". If "sleep" locking is used, and process A is
building a package, when process B attempts to build the same package,
process B will sleep for PKGSRC_SLEEPSECS seconds, and attempt to grab
the lock again.
Coarse-grained locking uses the OBJHOSTNAME definition to ensure that
the PID space is regular for shlock(1) to do its work. The
pkgsrc/pkgtools/shlock package has been provided for environments
where shlock is not standard.
Diffstat (limited to 'mk/bsd.pkg.defaults.mk')
-rw-r--r-- | mk/bsd.pkg.defaults.mk | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk index 3fae30d90f2..d2d24876fbc 100644 --- a/mk/bsd.pkg.defaults.mk +++ b/mk/bsd.pkg.defaults.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.defaults.mk,v 1.32 2002/01/11 14:41:42 agc Exp $ +# $NetBSD: bsd.pkg.defaults.mk,v 1.33 2002/01/19 21:29:41 agc Exp $ # # A file providing defaults for pkgsrc and the packages collection. @@ -31,6 +31,24 @@ # Possible: defined, not defined # Default: not defined +PKGSRC_LOCKTYPE?= none +# The type of locking which will be done if competing processes attempt to +# do work on one package directory simultaneously. +# + Locking requires that OBJHOSTNAME is set. +# + Locking may require the pkgsrc/pkgtools/shlock package to be installed +# on certain OS types. +# + Sleep locking means that the process will sleep for ${PKGSRC_SLEEPSECS} +# seconds, then try to acquire the lock, and sleeping again if it's not +# available. +# + Once locking will try once to acquire the lock, and then fail. +# Possible: none, sleep, once +# Default: none + +PKGSRC_SLEEPSECS?= 5 +# The number of seconds to wait when PKGSRC_LOCKTYPE is sleep +# Possible: a positive integer +# Default: 5 + #USETBL= # Run raw manual pages through tbl(1) before piping through troff(1) # when formatting manual pages. |