svn commit: r525388 - head/Mk

Mateusz Piotrowski 0mp at FreeBSD.org
Thu Feb 6 16:43:53 UTC 2020


Author: 0mp
Date: Thu Feb  6 16:43:52 2020
New Revision: 525388
URL: https://svnweb.freebsd.org/changeset/ports/525388

Log:
  Improve implementation of install-missing-packages
  
  As suggested by mat@ in D23484, let's use a proper if statement here
  instead of short-circuits operators. Also, arguments to echo should be
  quoted and ECHO_CMD should be used instead of ECHO (see bsd.commands.mk for
  details).
  
  Reported by:	mat
  Reviewed by:	mat
  Approved by:	portmgr
  Differential Revision:	https://reviews.freebsd.org/D23535

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Thu Feb  6 16:29:08 2020	(r525387)
+++ head/Mk/bsd.port.mk	Thu Feb  6 16:43:52 2020	(r525388)
@@ -4332,8 +4332,9 @@ missing-packages:
 # Install missing dependencies from package
 install-missing-packages:
 	@_dirs=$$(${MISSING-DEPENDS-LIST}); \
-	[ -z "$${_dirs}" ] || \
-	${SU_CMD} "${PKG_BIN} install -A $$(${ECHO} $${_dirs} | ${SED} "s%${PORTSDIR}/%%g")"
+	if [ -n "$${_dirs}" ]; then \
+		${SU_CMD} "${PKG_BIN} install -A $$(${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g")"; \
+	fi
 
 ################################################################
 # Everything after here are internal targets and really


More information about the svn-ports-all mailing list