--- trunk/mage/usr/lib/mage/depwalker.sh 2013/11/20 12:20:12 2280 +++ trunk/mage/usr/lib/mage/depwalker.sh 2013/11/20 12:21:28 2281 @@ -127,6 +127,12 @@ DFILE="$1" + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: depwalking magefile '${DFILE}'" >&2 + echo >&2 + fi + source ${DFILE} # forced nodeps @@ -185,6 +191,10 @@ if [ -z "${MY_DEPEND}" ] then + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: MY_DEPEND is empty; deps of '${DFILE}' ignored" >&2 + fi return 1 fi @@ -235,6 +245,10 @@ then depwalking ${HIGHEST_DEPFILE} ALLDEPS="${ALLDEPS} ${HIGHEST_DEPFILE}" + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: added '${HIGHEST_DEPFILE}' to ALLDEPS" >&2 + fi fi fi done << EOF @@ -265,11 +279,23 @@ # get the highest mage file from mage-db MAGEFILE="$(get_highest_magefile ${PCAT} ${PNAME})" + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: dep='${dep}'" >&2 + echo "DEBUG: PCAT='${PCAT}'" >&2 + echo "DEBUG: PNAME='${PNAME}'" >&2 + echo "DEBUG: MAGEFILE='${MAGEFILE}'" >&2 + fi + # if no install candidate was found, record this # and process with the next one if [[ -z ${MAGEFILE} ]] then NO_UPGRADE_CANDIDATE="${NO_UPGRADE_CANDIDATE} ${PCAT}/${PNAME}" + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: added to NO_UPGRADE_CANDIDATE" >&2 + fi continue fi @@ -277,6 +303,12 @@ PVER="$(magename2pver ${MAGEFILE})" PBUILD="$(magename2pbuild ${MAGEFILE})" + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: PVER='${PVER}'" >&2 + echo "DEBUG: PBUILD='${PBUILD}'" >&2 + fi + # do not walk files which are installed if [ ! -d ${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ] then @@ -287,8 +319,18 @@ # (if not exists already) if checklist_alldeps "${MAGEFILE}" then + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: added '${MAGEFILE}' to ALLDEPS" >&2 + fi ALLDEPS="${ALLDEPS} ${MAGEFILE}" fi + else + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: ignored package" >&2 + echo >&2 + fi fi done else @@ -308,6 +350,10 @@ # (if not exists already) if checklist_alldeps "${MAGEFILE}" then + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: added '${MAGEFILE}' to ALLDEPS" >&2 + fi ALLDEPS="${ALLDEPS} ${MAGEFILE}" fi fi