svn commit: r525138 - head/Mk
Mateusz Piotrowski
0mp at FreeBSD.org
Tue Feb 4 10:01:23 UTC 2020
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 at 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
More information about the svn-ports-all
mailing list