summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-08-04 20:52:27 +0000
committerrillig <rillig@pkgsrc.org>2006-08-04 20:52:27 +0000
commita5c5777ae52d24f0f96c81e099485eb4ba8513c3 (patch)
treec6403946f8ea93813813b4b26d0a6531fa3c42b7 /mk/bsd.pkg.mk
parentf96c7840bb3d73339241fe2e22c18027f103925e (diff)
downloadpkgsrc-a5c5777ae52d24f0f96c81e099485eb4ba8513c3.tar.gz
Fixed the locking, as suggested by Johnny on the tech-pkg mailing list.
Added two targets acquire-localbase-lock and release-localbase-lock, which mark the complete LOCALBASE directory as locked, so that multiple packages cannot run the install, deinstall or bin-install targets at the same time. The install target aquires locks in both WRKSRC and LOCALBASE, the other two targets only need the LOCALBASE lock, since they may be run without WRKSRC being present on the system. locking.mk must be included before tools.mk and the PKG_FAIL_REASON check.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk12
1 files changed, 3 insertions, 9 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index a9d9254f81d..897c7822036 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1883 2006/08/04 07:04:38 rillig Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1884 2006/08/04 20:52:27 rillig Exp $
#
# This file is in the public domain.
#
@@ -410,12 +410,8 @@ USE_TOOLS+= expr
USE_TOOLS+= tee tsort
.endif
-# We need shlock and sleep if we're using locking to synchronize multiple
-# builds over the same pkgsrc tree.
-#
-.if ${PKGSRC_LOCKTYPE} != "none"
-USE_TOOLS+= shlock sleep
-.endif
+# Locking
+.include "${PKGSRCDIR}/mk/internal/locking.mk"
# Tools
.include "../../mk/tools/bsd.tools.mk"
@@ -605,8 +601,6 @@ all: ${_PKGSRC_BUILD_TARGETS}
# adding pre-* or post-* targets/scripts, override these.
################################################################
-.include "${PKGSRCDIR}/mk/internal/locking.mk"
-
.PHONY: makedirs
makedirs: ${WRKDIR}