Date: Fri, 13 Nov 2015 18:00:34 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r401524 - head/Mk/Scripts Message-ID: <201511131800.tADI0Yc5060770@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511131800.tADI0Yc5060770>