Subject: CVS commit: pkgsrc/mk
To: None <pkgsrc-changes@NetBSD.org>
From: Roland Illig <rillig@netbsd.org>
List: pkgsrc-changes
Date: 08/04/2006 20:52:27
Module Name:	pkgsrc
Committed By:	rillig
Date:		Fri Aug  4 20:52:27 UTC 2006

Modified Files:
	pkgsrc/mk: bsd.pkg.mk
	pkgsrc/mk/install: bin-install.mk deinstall.mk install.mk
	pkgsrc/mk/internal: locking.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -r1.1883 -r1.1884 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -r1.2 -r1.3 pkgsrc/mk/install/bin-install.mk
cvs rdiff -r1.4 -r1.5 pkgsrc/mk/install/deinstall.mk
cvs rdiff -r1.15 -r1.16 pkgsrc/mk/install/install.mk
cvs rdiff -r1.1 -r1.2 pkgsrc/mk/internal/locking.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.