Date: Mon, 28 Sep 2020 13:46:43 +0000 (UTC) From: Mateusz Piotrowski <0mp@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r550426 - head/Mk Message-ID: <202009281346.08SDkhRQ025050@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: 0mp Date: Mon Sep 28 13:46:43 2020 New Revision: 550426 URL: https://svnweb.freebsd.org/changeset/ports/550426 Log: bsd.port.mk: Handle incorrect binary aliases gracefully Currently, if the src element of a BINARY_ALIAS pair is missing, the ports framework would just print out the help message of install(1) and exit with a failure. This might be hard to debug for novice ports users. Let's introduce a check, which would allow us to print that the src component is missing. This situation happens more often than it seems to. For example, BINARY_ALIAS tend to blow up when used for test dependencies, because binary aliases are created before test dependencies are installed. This leads to a lot of confusion for my experience. Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D26551 Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Sep 28 13:15:43 2020 (r550425) +++ head/Mk/bsd.port.mk Mon Sep 28 13:46:43 2020 (r550426) @@ -5134,7 +5134,12 @@ install-desktop-entries: .if !target(create-binary-alias) create-binary-alias: ${BINARY_LINKDIR} .for target src in ${BINARY_ALIAS:C/=/ /} - @${RLN} `which ${src}` ${BINARY_LINKDIR}/${target} + @if srcpath=`which -- ${src}`; then \ + ${RLN} $${srcpath} ${BINARY_LINKDIR}/${target}; \ + else \ + ${ECHO_MSG} "===> Missing \"${src}\" to create a binary alias at \"${BINARY_LINKDIR}/${target}\""; \ + ${FALSE}; \ + fi .endfor .endif .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009281346.08SDkhRQ025050>