2 |
# $Id$ |
# $Id$ |
3 |
# dependeny walker |
# dependeny walker |
4 |
|
|
|
decho() |
|
|
{ |
|
|
if [[ ${DEBUG} = 1 ]] |
|
|
then |
|
|
echo "DEBUG: $@" >&2 |
|
|
fi |
|
|
} |
|
|
|
|
5 |
# set default variables |
# set default variables |
6 |
: ${MAGERC="@@SYSCONFDIR@@/mage.rc"} |
: ${MAGERC="@@SYSCONFDIR@@/mage.rc"} |
7 |
: ${MLIBDIR="@@MAGELIBDIR@@"} |
: ${MLIBDIR="@@MAGELIBDIR@@"} |
13 |
source ${MLIBDIR}/mage4.functions.sh || die "mage functions missing" |
source ${MLIBDIR}/mage4.functions.sh || die "mage functions missing" |
14 |
source ${MLIBDIR}/smage2.functions.sh || die "smage functions missing" |
source ${MLIBDIR}/smage2.functions.sh || die "smage functions missing" |
15 |
|
|
16 |
|
decho() |
17 |
|
{ |
18 |
|
if [[ ${DEBUG} = 1 ]] |
19 |
|
then |
20 |
|
echo "DEBUG: $@" >&2 |
21 |
|
fi |
22 |
|
} |
23 |
|
|
24 |
usage() |
usage() |
25 |
{ |
{ |
26 |
echo |
echo |
203 |
|
|
204 |
# mark depfile as processed to prevent double runs -without version |
# mark depfile as processed to prevent double runs -without version |
205 |
# but do not add any virtuals to PROCESSEDDEPS or their resolved |
# but do not add any virtuals to PROCESSEDDEPS or their resolved |
206 |
# pkgnames will be ignored and they are missing on the dependecy-list |
# pkgnames will be ignored and they are missing on the dependency-list |
207 |
if [[ ${DEPNAME/virtual\//} = ${DEPNAME} ]] |
if [[ ${DEPNAME/virtual\//} = ${DEPNAME} ]] |
208 |
then |
then |
209 |
PROCESSEDDEPS="${PROCESSEDDEPS} ${DEPNAME%-*}" |
PROCESSEDDEPS="${PROCESSEDDEPS} ${DEPNAME%-*}" |
230 |
### check if the dependency is already installed ### |
### check if the dependency is already installed ### |
231 |
if [ ! -d ${MROOT}${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ] |
if [ ! -d ${MROOT}${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ] |
232 |
then |
then |
|
depwalking ${HIGHEST_DEPFILE} |
|
233 |
ALLDEPS="${ALLDEPS} ${HIGHEST_DEPFILE}" |
ALLDEPS="${ALLDEPS} ${HIGHEST_DEPFILE}" |
234 |
decho "added '${HIGHEST_DEPFILE}' to ALLDEPS" |
decho "added '${HIGHEST_DEPFILE}' to ALLDEPS" |
235 |
|
depwalking ${HIGHEST_DEPFILE} |
236 |
fi |
fi |
237 |
fi |
fi |
238 |
done << EOF |
done << EOF |