- 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]
This commit is contained in:
parent
e0b8bf257a
commit
56bd3649b5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=401524
@ -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."
|
||||
|
Loading…
Reference in New Issue
Block a user