Ignore:
Timestamp:
12/19/2021 04:30:10 PM (3 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, legacy, trunk
Children:
a78cfc9
Parents:
bbabe74
git-author:
Pierre Labastie <pierre.labastie@…> (12/19/2021 01:32:51 PM)
git-committer:
Pierre Labastie <pierre.labastie@…> (12/19/2021 04:30:10 PM)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/libs/func_dependencies

    rbbabe74 re0bbc6e  
    221221                      $3 contains the weight above which we do not want to
    222222                         follow an edge
    223                       "seen" (global) contains the list of already seen nodes
     223                      $seen (global) contains the list of already seen nodes.
     224                         It must ve set to " " prior to calling the function
    224225    returns:    0 if the node has been found
    225226                1 if not
     
    302303  echo Process "runtime" deps in $node
    303304  if ! [ -e ${node%.dep}groupxx.dep ]; then
    304     b=0
     305    b=0 # Nothing depends on <node>groupxx
    305306    for parent in $(grep -l ${node%.dep}\$ *); do
    306       p=0
     307      p=0 # No "after" dependency depends on this parent
    307308      for start in $(grep ' a ' $node | cut -d' ' -f3); do
    308         seen=" "
     309        seen=" " # global variable used in "path_to"
    309310        if path_to ${start}.dep ${parent%.dep} 3; then p=1; break; fi
    310311      done
     
    341342      fi
    342343      lines_to_change="$lines_to_change $id_of_dep"
    343       unset lr
     344      unset lr  # lines to remove in -pass1
    344345      {
    345346      while read p b start; do
    346         seen=" "
     347        seen=" " # global variable used in "path_to"
    347348        if path_to ${start}.dep ${node%.dep} $p; then
    348349          lr="$lr $start"
Note: See TracChangeset for help on using the changeset viewer.