[jhalfs] 04/06: Document some variables in func_dependencies

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository jhalfs.

commit e0bbc6e6acf1e2a5db68d81712cbdb1fb5c00c90
Author: Pierre Labastie <[email protected]>
AuthorDate: Sun Dec 19 14:32:51 2021 +0100

    Document some variables in func_dependencies
    
    Better document the $seen global variable used in path_to,
    also at places where "path_to" is called.
    Document p and b flags in the loop over "after" deps.
    Document lr variable in the loop over "first" deps.
---
 BLFS/libs/func_dependencies | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/BLFS/libs/func_dependencies b/BLFS/libs/func_dependencies
index 99df662..8c6b417 100644
--- a/BLFS/libs/func_dependencies
+++ b/BLFS/libs/func_dependencies
@@ -220,7 +220,8 @@ path_to() { #
                       $2 contains the name of the node to reach
                       $3 contains the weight above which we do not want to
                          follow an edge
-                      "seen" (global) contains the list of already seen nodes
+                      $seen (global) contains the list of already seen nodes.
+                         It must ve set to " " prior to calling the function
     returns:    0 if the node has been found
                 1 if not
     on error:   nothing
@@ -301,11 +302,11 @@ for node in $(grep -l ' a ' *.dep); do
   lines_to_remove=
   echo Process "runtime" deps in $node
   if ! [ -e ${node%.dep}groupxx.dep ]; then
-    b=0
+    b=0 # Nothing depends on <node>groupxx
     for parent in $(grep -l ${node%.dep}\$ *); do
-      p=0
+      p=0 # No "after" dependency depends on this parent
       for start in $(grep ' a ' $node | cut -d' ' -f3); do
-        seen=" "
+        seen=" " # global variable used in "path_to"
         if path_to ${start}.dep ${parent%.dep} 3; then p=1; break; fi
       done
       if test $p = 0; then
@@ -340,10 +341,10 @@ for node in $(grep -l ' f ' *); do
         cp ${id_of_dep}{,-pass1}.dep;
       fi
       lines_to_change="$lines_to_change $id_of_dep"
-      unset lr
+      unset lr  # lines to remove in -pass1
       {
       while read p b start; do
-        seen=" "
+        seen=" " # global variable used in "path_to"
         if path_to ${start}.dep ${node%.dep} $p; then
           lr="$lr $start"
         fi

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.