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:
Pierre Labastie 2018-02-19 16:01:00 +00:00
parent df1f318915
commit e030049a44

View file

@ -145,11 +145,19 @@ case $build_of_dep in
a) buildstring=runtime ;;
b) buildstring= ;;
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
case $depth$DEP_LEVEL in
23) ;;
*)
# Just display it and proceed.
echo -en "\nEdge: $depth${spaceSTR:0:$((depth + spacing))}${MAGENTA}${id_of_dep}${OFF} $priostring $buildstring"
continue
;;
esac
fi
# Is the weight higher than requested?
if [ "$prio_of_dep" -gt $dep_level ]; then