From owner-svn-ports-all@freebsd.org Fri Nov 13 18:00:35 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8260A2EB3C; Fri, 13 Nov 2015 18:00:35 +0000 (UTC) (envelope-from bdrewery@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 mx1.freebsd.org (Postfix) with ESMTPS id 946691104; Fri, 13 Nov 2015 18:00:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tADI0YS2060771; Fri, 13 Nov 2015 18:00:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tADI0Yc5060770; Fri, 13 Nov 2015 18:00:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511131800.tADI0Yc5060770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 13 Nov 2015 18:00:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r401524 - head/Mk/Scripts X-SVN-Group: ports-head 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.20 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: Fri, 13 Nov 2015 18:00:36 -0000 Author: bdrewery Date: Fri Nov 13 18:00:34 2015 New Revision: 401524 URL: https://svnweb.freebsd.org/changeset/ports/401524 Log: - Only consider missing dependency origins to be fatal if they were not satisfied and needed to be installed. This restores older behavior of allowing a partial checkout where dependencies are already installed. [1] - Delay fatal errors show that all can be shown at once. With hat: portmgr Reported by: lev [1] Modified: head/Mk/Scripts/do-depends.sh Modified: head/Mk/Scripts/do-depends.sh ============================================================================== --- head/Mk/Scripts/do-depends.sh Fri Nov 13 17:07:00 2015 (r401523) +++ head/Mk/Scripts/do-depends.sh Fri Nov 13 18:00:34 2015 (r401524) @@ -92,6 +92,7 @@ find_lib() } anynotfound=0 +err=0 for _line in ${dp_RAWDEPENDS} ; do myifs=${IFS} IFS=: @@ -101,7 +102,8 @@ for _line in ${dp_RAWDEPENDS} ; do echo "Error: bad dependency syntax in ${dp_DEPTYPE}" >&2 echo "expecting: pattern:origin[:target]" >&2 echo "got: ${_line}" >&2 - exit 1 + err=1 + continue fi pattern=$1 origin=$2 @@ -109,22 +111,20 @@ for _line in ${dp_RAWDEPENDS} ; do if [ -z "${pattern}" ]; then echo "Error: there is an empty port dependency in ${dp_DEPTYPE}" >&2 - exit 1 + err=1 + continue fi if [ -z "${origin}" ]; then echo "Error: a dependency has an empty origin in ${dp_DEPTYPE}" >&2 - exit 1 + err=1 + continue fi case "${origin}" in /*) ;; *) origin="${dp_PORTSDIR}/${origin}" ;; esac - if [ ! -f "${origin}/Makefile" ]; then - echo "Error a dependency refers to a non existing origin: ${origin} in ${dp_DEPTYPE}" >&2 - exit 1 - fi depends_args="${dp_DEPENDS_ARGS}" target=${dp_DEPENDS_TARGET} @@ -146,7 +146,9 @@ for _line in ${dp_RAWDEPENDS} ; do lib*.so*) fct=find_lib ;; *) echo "Error: pattern ${pattern} in LIB_DEPENDS is not valid" - exit 1 ;; + err=1 + continue + ;; esac ;; *) case ${pattern} in @@ -161,6 +163,12 @@ for _line in ${dp_RAWDEPENDS} ; do fi [ ${pattern} = "/nonexistent" ] || anynotfound=1 + if [ ! -f "${origin}/Makefile" ]; then + echo "Error a dependency refers to a non existing origin: ${origin} in ${dp_DEPTYPE}" >&2 + err=1 + continue + fi + # Now actually install the dependencies install_depends "${origin}" "${target}" "${depends_args}" # Recheck if the installed dependency validates the pattern except for /nonexistent @@ -168,6 +176,11 @@ for _line in ${dp_RAWDEPENDS} ; do echo "===> Returning to build of ${dp_PKGNAME}" done +if [ $err -eq 1 ]; then + echo "Errors with dependencies." + exit 1 +fi + if [ -n "${dp_STRICT_DEPENDS}" -a ${anynotfound} -eq 1 ]; then \ echo "===> dp_STRICT_DEPENDS set - Not installing missing dependencies." echo " This means a dependency is wrong since it was not satisfied in the ${dp_DEPTYPE} phase."