--- trunk/mage/usr/lib/mage/depwalker.sh 2013/10/14 13:13:46 2210 +++ trunk/mage/usr/lib/mage/depwalker.sh 2013/10/25 07:52:22 2275 @@ -27,20 +27,25 @@ echo "Usage: $(basename $0) [command] [arg] ..." echo echo " -h --help shows this help" - echo " -c --pcat categorie of the package" + echo " -c --pcat category of the package" echo " -n --pname name of the package" echo " -v --pver version number of the package" echo " -b --pbuild build number of the package" echo " -m --method which calc method should be used:" echo " install, srcinstall, depend, srcdepend" echo " upgrade, srcupgrade," - echo " install-build-prerequisites, pretend-build-prerequisites" + echo " install-build-prerequisites," + echo " pretend-build-prerequisites" + echo " -d --debug enable debug mode" echo echo "method, name, version and build must be given !" echo exit 1 } +# always default debug=0 +DEBUG=0 + # very basic getops for i in $* do @@ -50,6 +55,7 @@ --pver|-v) shift; PVER="$1" ;; --pbuild|-b) shift; PBUILD="$1" ;; --method|-m) shift; METHOD="$1" ;; + --debug|-d) shift; DEBUG=1 ;; --help|-h) usage ;; esac shift @@ -184,6 +190,11 @@ while read SYM DEPNAME do + if [[ ${DEBUG} = 1 ]] + then + echo "DEBUG: DEPNAME='${DEPNAME}'" >&2 + fi + # exclude empty depnames [[ -z ${DEPNAME} ]] && continue @@ -320,7 +331,7 @@ PBUILD="$(magename2pbuild ${i})" if [ -z "${list}" ] then - list="\t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" + list="\t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" else list="${list} \t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}"