--- b/Mk/Scripts/depends-list.sh +++ b/Mk/Scripts/depends-list.sh @@ -54,6 +58,31 @@ if [ ${missing} -eq 1 ]; then existing=$(${dp_PKG_INFO} -aoq|paste -d ' ' -s -) fi +proc_flv() { + local f + + d=${1} + case "${d}" in + *@*/*) + return 1 # Ignore @ in the path which would not be a flavor + ;; + *@*) + f=${d##*@} + d=${d%@*} + ;; + *) + return 1 + ;; + esac + if [ -f ${d}/Makefile ]; then + if [ -n ${f} ]; then + export FLAVOR=${f} + fi + return 0 + fi + return 1 +} + check_dep() { local _dep wrkdir show_dep @@ -65,24 +94,16 @@ check_dep() { IFS=${myifs} case "${2}" in - /*) d=${2} ;; - *) for overlay in ${dp_OVERLAYS} ${PORTSDIR}; do - d=${overlay}/${2} - f= - case "${d}" in - *@*/*) ;; # Ignore @ in the path which would not be a flavor - *@*) - f=${d##*@} - d=${d%@*} - ;; - esac - if [ -f ${d}/Makefile ]; then - if [ -n $f ]; then - export FLAVOR=$f + /*) + proc_flv ${2} || true ;; + *) + for overlay in ${dp_OVERLAYS} ${PORTSDIR}; do + if proc_flv ${overlay}/${2} + then + break fi - break - fi - done + done + ;; esac if [ ${flavors} -eq 1 -a -n "${FLAVOR:-}" ]; then