BLFS/func_dependencies: when building the graph, and DEP_LEVEL=3 (build opt
deps only for requested packages), it may happen that a requested packages is seen at depth > 2 before it is seen at depth=2. In this case, optional deps are not processed the first time, and then the package is not processed at depth 2 because it has already been seen. Add a case statement against that.
This commit is contained in:
parent
df1f318915
commit
e030049a44
1 changed files with 15 additions and 7 deletions
|
@ -135,21 +135,29 @@ if (( depth < 10 )); then spacing=1; else spacing=0; fi
|
||||||
# Start of loop
|
# Start of loop
|
||||||
{
|
{
|
||||||
while read prio_of_dep build_of_dep id_of_dep; do
|
while read prio_of_dep build_of_dep id_of_dep; do
|
||||||
case $prio_of_dep in
|
case $prio_of_dep in
|
||||||
1) priostring=required ;;
|
1) priostring=required ;;
|
||||||
2) priostring=recommended ;;
|
2) priostring=recommended ;;
|
||||||
3) priostring=optional ;;
|
3) priostring=optional ;;
|
||||||
4) priostring=external ;;
|
4) priostring=external ;;
|
||||||
esac
|
esac
|
||||||
case $build_of_dep in
|
case $build_of_dep in
|
||||||
a) buildstring=runtime ;;
|
a) buildstring=runtime ;;
|
||||||
b) buildstring= ;;
|
b) buildstring= ;;
|
||||||
esac
|
esac
|
||||||
# Has this entry already been seen
|
# Has this entry already been seen?
|
||||||
|
# We have a special case here: if the entry has been seen at depth > 2
|
||||||
|
# and now depth=2 and DEP_LEVEL=3, optional deps have not been processed.
|
||||||
|
# If this is the case, just consider it has not been seen.
|
||||||
if [ -f ${id_of_dep}.dep ] ; then
|
if [ -f ${id_of_dep}.dep ] ; then
|
||||||
|
case $depth$DEP_LEVEL in
|
||||||
|
23) ;;
|
||||||
|
*)
|
||||||
# Just display it and proceed.
|
# Just display it and proceed.
|
||||||
echo -en "\nEdge: $depth${spaceSTR:0:$((depth + spacing))}${MAGENTA}${id_of_dep}${OFF} $priostring $buildstring"
|
echo -en "\nEdge: $depth${spaceSTR:0:$((depth + spacing))}${MAGENTA}${id_of_dep}${OFF} $priostring $buildstring"
|
||||||
continue
|
continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
# Is the weight higher than requested?
|
# Is the weight higher than requested?
|
||||||
if [ "$prio_of_dep" -gt $dep_level ]; then
|
if [ "$prio_of_dep" -gt $dep_level ]; then
|
||||||
|
|
Reference in a new issue