Commit 3273fa2d authored by Mateusz Piotrowski's avatar Mateusz Piotrowski

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


git-svn-id: svn+ssh://svn.freebsd.org/ports/[email protected] 35697150-7ecd-e111-bb59-0022644237b5
parent 01d00c2f
......@@ -605,7 +605,7 @@ FreeBSD_MAINTAINER= [email protected]
# 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment