Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 2020 16:43:53 +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: r525388 - head/Mk
Message-ID:  <202002061643.016GhrXc040942@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002061643.016GhrXc040942>