Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.links.mk
Show All 9 Lines | |||||
.endif | .endif | ||||
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g} | TAG_ARGS= -T ${TAGS:[*]:S/ /,/g} | ||||
.endif | .endif | ||||
afterinstall: _installlinks | afterinstall: _installlinks | ||||
.ORDER: realinstall _installlinks | .ORDER: realinstall _installlinks | ||||
_installlinks: | _installlinks: | ||||
.for s t in ${LINKS} | .for s t in ${LINKS} | ||||
# Don't delete the source file on a case-insensitive file-system and pass -S | |||||
# to install to avoid overwriting the source | |||||
.if ${s:tl} == ${t:tl} | |||||
if test "${DESTDIR}${t}" -ef "${DESTDIR}${s}"; then \ | |||||
echo "Note: installing link from ${l} to ${t} on case-insensitive file system."; \ | |||||
imp: My first thought is 'why not include this always?'
I know Linux has a different -S flag, but… | |||||
Done Inline ActionsI'd be happy to add -S unconditionally, moving to a temporary file and renaming should not make much of a difference. I added this additional check in case this is considered too expensive. Should we always use -S, or only if tolower(source) == tolower(target)? arichardson: I'd be happy to add -S unconditionally, moving to a temporary file and renaming should not make… | |||||
Not Done Inline ActionsI'd been thinking of asking for unconditional. If you do it unconditionally, is there some measurable speed difference? imp: I'd been thinking of asking for unconditional. If you do it unconditionally, is there some… | |||||
Not Done Inline ActionsIn a quick and dirty benchmark there's a measurable difference doing 100k simple install's with and without -S, but we're talking ~72s vs ~105s. Given we only have ~1500 links in an install the actual difference might be a second at most. brooks: In a quick and dirty benchmark there's a measurable difference doing 100k simple install's with… | |||||
fi | |||||
${INSTALL_LINK} -S ${TAG_ARGS} ${DESTDIR}${s} ${DESTDIR}${t} | |||||
.else | |||||
${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}${s} ${DESTDIR}${t} | ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}${s} ${DESTDIR}${t} | ||||
.endif | |||||
.endfor | .endfor | ||||
.for s t in ${SYMLINKS} | .for s t in ${SYMLINKS} | ||||
${INSTALL_SYMLINK} ${TAG_ARGS} ${s} ${DESTDIR}${t} | ${INSTALL_SYMLINK} ${TAG_ARGS} ${s} ${DESTDIR}${t} | ||||
bdreweryUnsubmitted Not Done Inline ActionsWhy not here? bdrewery: Why not here? | |||||
arichardsonAuthorUnsubmitted Done Inline ActionsThis case didn't trigger errors, so I didn't notice. Fixed now. arichardson: This case didn't trigger errors, so I didn't notice. Fixed now. | |||||
.endfor | .endfor |
My first thought is 'why not include this always?'
I know Linux has a different -S flag, but all this is done using a bootstrapped installer. Wouldn't it be a lot simpler to just always use safe mode? Doesn't seem like it would be significantly slower and it would just work everywhere.