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.
This commit is contained in:
Ruslan Ermilov 2005-11-03 08:56:39 +00:00
parent 8be20fbe2a
commit 6660f1d7c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152006
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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}} \