diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-11-13 18:00:34 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-11-13 18:00:34 +0000 |
commit | 56bd3649b52e743be2941444c4ed833e3fa37ca4 (patch) | |
tree | 320a1e8fd7428ac73505f5c11ea2d6c0234c5fef /Mk | |
parent | 1) Refresh toxcore (diff) |
- 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]
Notes
Notes:
svn path=/head/; revision=401524
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/do-depends.sh | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/Mk/Scripts/do-depends.sh b/Mk/Scripts/do-depends.sh index 182215509f71..abd400b26f05 100644 --- a/Mk/Scripts/do-depends.sh +++ b/Mk/Scripts/do-depends.sh @@ -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." |