Date: Tue, 4 Feb 2020 10:01:23 +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: r525138 - head/Mk Message-ID: <202002041001.014A1N0P003972@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: 0mp Date: Tue Feb 4 10:01:23 2020 New Revision: 525138 URL: https://svnweb.freebsd.org/changeset/ports/525138 Log: Fix install-missing-packages r519284 introduced a new target, install-missing-packages, which is meant to allow users to install dependencies via pkg(8) instead of building them themselves locally. The target was producing errors when the dependencies were already available on the system. This commit adjusts this behavior to just silently do nothing if everything is fine. Also, wrap the command with SU_CMD for better user experience. Also, fix some trailing whitespace introduced in the original commit. Reviewed by: bapt Approved by: portmgr Differential Revision: https://reviews.freebsd.org/D23484 Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Tue Feb 4 09:59:25 2020 (r525137) +++ head/Mk/bsd.port.mk Tue Feb 4 10:01:23 2020 (r525138) @@ -605,7 +605,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # for this port. # install-missing-packages # - Install missing dependencies from package and mark -# them as automatically installed +# them as automatically installed. # extract - Unpacks ${DISTFILES} into ${WRKDIR}. # patch - Apply any provided patches to the source. # configure - Runs either GNU configure, one or more local configure @@ -4332,7 +4332,8 @@ missing-packages: # Install missing dependencies from package install-missing-packages: @_dirs=$$(${MISSING-DEPENDS-LIST}); \ - ${PKG_BIN} install -A $$(${ECHO} $${_dirs} | ${SED} "s%${PORTSDIR}/%%g") + [ -z "$${_dirs}" ] || \ + ${SU_CMD} "${PKG_BIN} install -A $$(${ECHO} $${_dirs} | ${SED} "s%${PORTSDIR}/%%g")" ################################################################ # Everything after here are internal targets and really
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002041001.014A1N0P003972>