--- branches/mage-next/src/depwalker.in 2014/03/05 08:19:29 2628 +++ branches/mage-next/src/depwalker.in 2014/10/22 12:27:17 2839 @@ -1,6 +1,6 @@ #!/bin/bash # $Id$ -# dependeny walker +# dependency walker # set default variables : ${MAGERC="@@SYSCONFDIR@@/mage.rc"} @@ -44,8 +44,9 @@ exit 1 } -# always default debug=0 +# set some sane defaults DEBUG=0 +SMAGE_DEPEND=0 # very basic getops for i in $* @@ -57,7 +58,7 @@ --pbuild|-b) shift; PBUILD="$1" ;; --method|-m) shift; METHOD="$1" ;; --debug|-d) shift; DEBUG=1 ;; - --smage|-s) shift; SMAGEFILE="$1"; SILENT=1; FVERBOSE=off ;; + --smage|-s) shift; SMAGEFILE="$1"; SMAGE_DEPEND=1; SILENT=1; FVERBOSE=off ;; --help|-h) usage ;; esac shift @@ -78,6 +79,9 @@ [ -z "${INSTALLDB}" ] && die "\$INSTALLDB not set." [ -z "${BUILDDIR}" ] && die "\$BUILDDIR not set." +# load mage-features to support them with smagesource() +load_mage_features + # other needed vars ALLDEPS="" if [[ -n ${SMAGEFILE} ]] @@ -203,7 +207,7 @@ # mark depfile as processed to prevent double runs -without version # but do not add any virtuals to PROCESSEDDEPS or their resolved - # pkgnames will be ignored and they are missing on the dependecy-list + # pkgnames will be ignored and they are missing on the dependency-list if [[ ${DEPNAME/virtual\//} = ${DEPNAME} ]] then PROCESSEDDEPS="${PROCESSEDDEPS} ${DEPNAME%-*}" @@ -230,6 +234,7 @@ ### check if the dependency is already installed ### if [ ! -d ${MROOT}${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ] then + # but first get all deps of highest_depfile to catch all dependencies of it depwalking ${HIGHEST_DEPFILE} ALLDEPS="${ALLDEPS} ${HIGHEST_DEPFILE}" decho "added '${HIGHEST_DEPFILE}' to ALLDEPS"