127 |
|
|
128 |
DFILE="$1" |
DFILE="$1" |
129 |
|
|
130 |
|
if [[ ${DEBUG} = 1 ]] |
131 |
|
then |
132 |
|
echo "DEBUG: depwalking magefile '${DFILE}'" >&2 |
133 |
|
echo >&2 |
134 |
|
fi |
135 |
|
|
136 |
source ${DFILE} |
source ${DFILE} |
137 |
|
|
138 |
# forced nodeps |
# forced nodeps |
191 |
|
|
192 |
if [ -z "${MY_DEPEND}" ] |
if [ -z "${MY_DEPEND}" ] |
193 |
then |
then |
194 |
|
if [[ ${DEBUG} = 1 ]] |
195 |
|
then |
196 |
|
echo "DEBUG: MY_DEPEND is empty; deps of '${DFILE}' ignored" >&2 |
197 |
|
fi |
198 |
return 1 |
return 1 |
199 |
fi |
fi |
200 |
|
|
245 |
then |
then |
246 |
depwalking ${HIGHEST_DEPFILE} |
depwalking ${HIGHEST_DEPFILE} |
247 |
ALLDEPS="${ALLDEPS} ${HIGHEST_DEPFILE}" |
ALLDEPS="${ALLDEPS} ${HIGHEST_DEPFILE}" |
248 |
|
if [[ ${DEBUG} = 1 ]] |
249 |
|
then |
250 |
|
echo "DEBUG: added '${HIGHEST_DEPFILE}' to ALLDEPS" >&2 |
251 |
|
fi |
252 |
fi |
fi |
253 |
fi |
fi |
254 |
done << EOF |
done << EOF |
279 |
# get the highest mage file from mage-db |
# get the highest mage file from mage-db |
280 |
MAGEFILE="$(get_highest_magefile ${PCAT} ${PNAME})" |
MAGEFILE="$(get_highest_magefile ${PCAT} ${PNAME})" |
281 |
|
|
282 |
|
if [[ ${DEBUG} = 1 ]] |
283 |
|
then |
284 |
|
echo "DEBUG: dep='${dep}'" >&2 |
285 |
|
echo "DEBUG: PCAT='${PCAT}'" >&2 |
286 |
|
echo "DEBUG: PNAME='${PNAME}'" >&2 |
287 |
|
echo "DEBUG: MAGEFILE='${MAGEFILE}'" >&2 |
288 |
|
fi |
289 |
|
|
290 |
# if no install candidate was found, record this |
# if no install candidate was found, record this |
291 |
# and process with the next one |
# and process with the next one |
292 |
if [[ -z ${MAGEFILE} ]] |
if [[ -z ${MAGEFILE} ]] |
293 |
then |
then |
294 |
NO_UPGRADE_CANDIDATE="${NO_UPGRADE_CANDIDATE} ${PCAT}/${PNAME}" |
NO_UPGRADE_CANDIDATE="${NO_UPGRADE_CANDIDATE} ${PCAT}/${PNAME}" |
295 |
|
if [[ ${DEBUG} = 1 ]] |
296 |
|
then |
297 |
|
echo "DEBUG: added to NO_UPGRADE_CANDIDATE" >&2 |
298 |
|
fi |
299 |
continue |
continue |
300 |
fi |
fi |
301 |
|
|
303 |
PVER="$(magename2pver ${MAGEFILE})" |
PVER="$(magename2pver ${MAGEFILE})" |
304 |
PBUILD="$(magename2pbuild ${MAGEFILE})" |
PBUILD="$(magename2pbuild ${MAGEFILE})" |
305 |
|
|
306 |
|
if [[ ${DEBUG} = 1 ]] |
307 |
|
then |
308 |
|
echo "DEBUG: PVER='${PVER}'" >&2 |
309 |
|
echo "DEBUG: PBUILD='${PBUILD}'" >&2 |
310 |
|
fi |
311 |
|
|
312 |
# do not walk files which are installed |
# do not walk files which are installed |
313 |
if [ ! -d ${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ] |
if [ ! -d ${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ] |
314 |
then |
then |
315 |
# get dependencies the package |
# get dependencies the package |
316 |
depwalking ${MAGEFILE} |
depwalking ${MAGEFILE} |
317 |
|
|
318 |
|
# now add the package itself to the dependencies |
319 |
|
# (if not exists already) |
320 |
|
if checklist_alldeps "${MAGEFILE}" |
321 |
|
then |
322 |
|
if [[ ${DEBUG} = 1 ]] |
323 |
|
then |
324 |
|
echo "DEBUG: added '${MAGEFILE}' to ALLDEPS" >&2 |
325 |
|
fi |
326 |
|
ALLDEPS="${ALLDEPS} ${MAGEFILE}" |
327 |
|
fi |
328 |
|
else |
329 |
|
if [[ ${DEBUG} = 1 ]] |
330 |
|
then |
331 |
|
echo "DEBUG: ignored package" >&2 |
332 |
|
echo >&2 |
333 |
|
fi |
334 |
fi |
fi |
335 |
done |
done |
336 |
else |
else |
340 |
fi |
fi |
341 |
|
|
342 |
if [[ ${METHOD} != install-build-prerequisites ]] && |
if [[ ${METHOD} != install-build-prerequisites ]] && |
343 |
[[ ${METHOD} != pretend-build-prerequisites ]] |
[[ ${METHOD} != pretend-build-prerequisites ]] && |
344 |
|
[[ ${METHOD} != upgrade ]] && |
345 |
|
[[ ${METHOD} != uppretend ]] && |
346 |
|
[[ ${METHOD} != srcupgrade ]] && |
347 |
|
[[ ${METHOD} != srcuppretend ]] |
348 |
then |
then |
349 |
# now add the package itself to the dependencies |
# now add the package itself to the dependencies |
350 |
# (if not exists already) |
# (if not exists already) |
351 |
if checklist_alldeps "${MAGEFILE}" |
if checklist_alldeps "${MAGEFILE}" |
352 |
then |
then |
353 |
|
if [[ ${DEBUG} = 1 ]] |
354 |
|
then |
355 |
|
echo "DEBUG: added '${MAGEFILE}' to ALLDEPS" >&2 |
356 |
|
fi |
357 |
ALLDEPS="${ALLDEPS} ${MAGEFILE}" |
ALLDEPS="${ALLDEPS} ${MAGEFILE}" |
358 |
fi |
fi |
359 |
fi |
fi |