--- trunk/mage/usr/lib/mage/depwalker.sh 2008/01/13 21:32:38 654 +++ trunk/mage/usr/lib/mage/depwalker.sh 2008/03/26 15:58:25 701 @@ -1,7 +1,7 @@ #!/bin/bash #depwalker -# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/depwalker.sh,v 1.7 2008-01-13 21:32:38 niro Exp $ +# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/depwalker.sh,v 1.10 2008-03-26 15:58:25 niro Exp $ # default die function die() @@ -57,7 +57,7 @@ echo " install, srcinstall, depend, srcdepend" echo " upgrade, srcupgrade" echo - echo "method,name, version and build must be given !" + echo "method, name, version and build must be given !" echo exit 1 } @@ -175,6 +175,9 @@ while read SYM DEPNAME do + # exclude empty depnames + [[ -z ${DEPNAME} ]] && continue + # exclude all already processed deps -without version if ! checklist_processeddeps "${DEPNAME%-*}" then @@ -182,7 +185,12 @@ fi # mark depfile as processed to prevent double runs -without version - PROCESSEDDEPS="${PROCESSEDDEPS} ${DEPNAME%-*}" + # but do not add any virtuals to PROCESSEDDEPS or their resolved + # pkgnames will be ignored and they are missing on the dependecy-list + if [[ ${DEPNAME/virtual\//} = ${DEPNAME} ]] + then + PROCESSEDDEPS="${PROCESSEDDEPS} ${DEPNAME%-*}" + fi HIGHEST_DEPFILE=$(dep2highest_magefile "${DEPNAME}") @@ -236,6 +244,14 @@ # get the highest mage file from mage-db MAGEFILE="$(get_highest_magefile ${PCAT} ${PNAME})" + # 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}" + continue + fi + # now get the pver&pbuild from the new file PVER="$(magename2pver ${MAGEFILE})" PBUILD="$(magename2pbuild ${MAGEFILE})" @@ -301,6 +317,20 @@ echo "done" echo -e "${list}" echo + + if [[ ! -z ${NO_UPGRADE_CANDIDATE} ]] + then + echo -e "${COLRED}Currently no candidates found for:${COLDEFAULT}" + for i in ${NO_UPGRADE_CANDIDATE} + do + echo -e "${COLRED} ${i}${COLDEFAULT}" + done + echo + echo -e "${COLRED}Please consider to uninstall all of them first,${COLDEFAULT}" + echo -e "${COLRED}because these packages does not exist in this distribution${COLDEFAULT}" + echo -e "${COLRED}and there will be no further updates or support for them.${COLDEFAULT}" + echo + fi fi ## return output from src/install deps