From owner-svn-ports-all@freebsd.org Tue Feb 4 10:01:23 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4559241CE1; Tue, 4 Feb 2020 10:01:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48BgFb4K7gz3C8S; Tue, 4 Feb 2020 10:01:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F783FF67; Tue, 4 Feb 2020 10:01:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 014A1Nue003973; Tue, 4 Feb 2020 10:01:23 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 014A1N0P003972; Tue, 4 Feb 2020 10:01:23 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202002041001.014A1N0P003972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 4 Feb 2020 10:01:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r525138 - head/Mk X-SVN-Group: ports-head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/Mk X-SVN-Commit-Revision: 525138 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2020 10:01:23 -0000 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@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