summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-11-03 08:56:39 +0000
committerru <ru@FreeBSD.org>2005-11-03 08:56:39 +0000
commitf5e9153f170bd9a9775c38999953cf040b918899 (patch)
treebc4b0a2cc3fc6bb520321021feb7cad53a41f5f8
parent94d7cede201189260f4418cb20a641ce856ad4b8 (diff)
downloadFreeBSD-src-f5e9153f170bd9a9775c38999953cf040b918899.zip
FreeBSD-src-f5e9153f170bd9a9775c38999953cf040b918899.tar.gz
Serialize access to the info/dir file; needed for parallel installs.
Reported by: scottl I'm not very fond of using the non-standard lockf(1) here, but I have no better idea at the moment. NetBSD uses ln(1) to create a lock file, but this approach can result in a deadlock if make is interrupted, leaving an orphaned lock file.
-rw-r--r--Makefile.inc12
-rw-r--r--share/mk/bsd.info.mk1
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 0c270e9..f998063 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -522,7 +522,7 @@ distributeworld installworld: installcheck
mkdir -p ${INSTALLTMP}
for prog in [ awk cap_mkdb cat chflags chmod chown \
date echo egrep find grep install-info \
- ln make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
+ ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
test true uname wc zic; do \
cp `which $$prog` ${INSTALLTMP}; \
done
diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk
index 717007d..1de6cf7 100644
--- a/share/mk/bsd.info.mk
+++ b/share/mk/bsd.info.mk
@@ -145,6 +145,7 @@ ${x:S/$/${ICOMPRESS_EXT}/}: ${x}
.for x in ${INFO}
INSTALLINFODIRS+= ${x:S/$/-install/}
${x:S/$/-install/}:
+ lockf -k ${DESTDIR}${INFODIR}/${INFODIRFILE} \
${INSTALLINFO} ${INSTALLINFOFLAGS} \
--defsection=${INFOSECTION} \
--defentry=${INFOENTRY_${x}} \
OpenPOWER on IntegriCloud