diff options
author | Mateusz Piotrowski <0mp@FreeBSD.org> | 2020-02-04 10:01:23 +0000 |
---|---|---|
committer | Mateusz Piotrowski <0mp@FreeBSD.org> | 2020-02-04 10:01:23 +0000 |
commit | f42c5dfeb943ee6a2878b6e25647ee64bf741973 (patch) | |
tree | b7d6cd32cb1a7902a7eabb67c3fc1c254f92b21b | |
parent | math/poly2tri: fix build on GCC architectures (diff) |
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
-rw-r--r-- | Mk/bsd.port.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 5a270b3c8922..8d9a1c949210 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -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 |