Author: pierre
Date: Mon Feb 19 08:01:00 2018
New Revision: 4048

Log:
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.

Modified:
   jhalfs/trunk/BLFS/libs/func_dependencies

Modified: jhalfs/trunk/BLFS/libs/func_dependencies
==============================================================================
--- jhalfs/trunk/BLFS/libs/func_dependencies    Sat Feb 10 23:31:23 2018        
(r4047)
+++ jhalfs/trunk/BLFS/libs/func_dependencies    Mon Feb 19 08:01:00 2018        
(r4048)
@@ -135,21 +135,29 @@
 # Start of loop
 {
 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 ;;
     2) priostring=recommended ;;
     3) priostring=optional ;;
     4) priostring=external ;;
-esac
-case $build_of_dep in
+  esac
+  case $build_of_dep in
     a) buildstring=runtime ;;
     b) buildstring=        ;;
-esac
-# Has this entry already been seen
+  esac
+# 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
+         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
-- 
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page

Reply via email to