1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
|
3 |
#depwalker |
#depwalker |
4 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/depwalker.sh,v 1.8 2008-01-13 21:42:16 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/depwalker.sh,v 1.11 2008-10-05 10:33:36 niro Exp $ |
5 |
|
|
6 |
# default die function |
# default die function |
7 |
die() |
die() |
57 |
echo " install, srcinstall, depend, srcdepend" |
echo " install, srcinstall, depend, srcdepend" |
58 |
echo " upgrade, srcupgrade" |
echo " upgrade, srcupgrade" |
59 |
echo |
echo |
60 |
echo "method,name, version and build must be given !" |
echo "method, name, version and build must be given !" |
61 |
echo |
echo |
62 |
exit 1 |
exit 1 |
63 |
} |
} |
143 |
DFILE="$1" |
DFILE="$1" |
144 |
|
|
145 |
source ${DFILE} |
source ${DFILE} |
146 |
|
|
147 |
|
# forced nodeps |
148 |
|
if [[ ${NODEPS} = true ]] |
149 |
|
then |
150 |
|
DEPEND="" |
151 |
|
SDEPEND="" |
152 |
|
fi |
153 |
|
|
154 |
MY_DEPEND="${DEPEND}" |
MY_DEPEND="${DEPEND}" |
155 |
|
|
156 |
# for srcinstall & srcdepend only; SDEPEND also needed |
# for srcinstall & srcdepend only; SDEPEND also needed |
193 |
fi |
fi |
194 |
|
|
195 |
# mark depfile as processed to prevent double runs -without version |
# mark depfile as processed to prevent double runs -without version |
196 |
PROCESSEDDEPS="${PROCESSEDDEPS} ${DEPNAME%-*}" |
# but do not add any virtuals to PROCESSEDDEPS or their resolved |
197 |
|
# pkgnames will be ignored and they are missing on the dependecy-list |
198 |
|
if [[ ${DEPNAME/virtual\//} = ${DEPNAME} ]] |
199 |
|
then |
200 |
|
PROCESSEDDEPS="${PROCESSEDDEPS} ${DEPNAME%-*}" |
201 |
|
fi |
202 |
|
|
203 |
HIGHEST_DEPFILE=$(dep2highest_magefile "${DEPNAME}") |
HIGHEST_DEPFILE=$(dep2highest_magefile "${DEPNAME}") |
204 |
|
|
252 |
# get the highest mage file from mage-db |
# get the highest mage file from mage-db |
253 |
MAGEFILE="$(get_highest_magefile ${PCAT} ${PNAME})" |
MAGEFILE="$(get_highest_magefile ${PCAT} ${PNAME})" |
254 |
|
|
255 |
|
# if no install candidate was found, record this |
256 |
|
# and process with the next one |
257 |
|
if [[ -z ${MAGEFILE} ]] |
258 |
|
then |
259 |
|
NO_UPGRADE_CANDIDATE="${NO_UPGRADE_CANDIDATE} ${PCAT}/${PNAME}" |
260 |
|
continue |
261 |
|
fi |
262 |
|
|
263 |
# now get the pver&pbuild from the new file |
# now get the pver&pbuild from the new file |
264 |
PVER="$(magename2pver ${MAGEFILE})" |
PVER="$(magename2pver ${MAGEFILE})" |
265 |
PBUILD="$(magename2pbuild ${MAGEFILE})" |
PBUILD="$(magename2pbuild ${MAGEFILE})" |
325 |
echo "done" |
echo "done" |
326 |
echo -e "${list}" |
echo -e "${list}" |
327 |
echo |
echo |
328 |
|
|
329 |
|
if [[ ! -z ${NO_UPGRADE_CANDIDATE} ]] |
330 |
|
then |
331 |
|
echo -e "${COLRED}Currently no candidates found for:${COLDEFAULT}" |
332 |
|
for i in ${NO_UPGRADE_CANDIDATE} |
333 |
|
do |
334 |
|
echo -e "${COLRED} ${i}${COLDEFAULT}" |
335 |
|
done |
336 |
|
echo |
337 |
|
echo -e "${COLRED}Please consider to uninstall all of them first,${COLDEFAULT}" |
338 |
|
echo -e "${COLRED}because these packages does not exist in this distribution${COLDEFAULT}" |
339 |
|
echo -e "${COLRED}and there will be no further updates or support for them.${COLDEFAULT}" |
340 |
|
echo |
341 |
|
fi |
342 |
fi |
fi |
343 |
|
|
344 |
## return output from src/install deps |
## return output from src/install deps |