- Timestamp:
- 12/18/2021 02:28:47 PM (3 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- ff5c301
- Parents:
- 7ae9774
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/libs/func_dependencies
r7ae9774 rdd9ca56 37 37 # topological sort. # 38 38 # # 39 # TODO: document each pass40 # Data layout:#41 # TODO: needs also to document the .tree files, and the "f" qualifier42 # 39 # Pass 1: graph generation # 40 # ======================== # 41 # Data layout for pass 1 # 42 # ---------------------- # 43 43 # A node of the tree is represented by a text file <nodeName>.dep. Each edge # 44 44 # starting from this node is represented by a line in this file. We keep # … … 47 47 # contains three fields: # 48 48 # - the weight of the edge # 49 # - the "before" (b) or "after" (a) qualifier # 50 # - the name of the destination of the edge # 51 # # 52 # TODO: The following is obsolete 49 # - the qualifier: "before" (b), "after" (a), or "first" (f) # 50 # - the name of the destination of the edge (without the ".dep" extension) # 51 # # 52 # Recursive function "generate_subgraph" # 53 # -------------------------------------- # 54 # This function treats a node of the graph that is not a leaf and that is # 55 # seen for the first time in the DFS. The dependencies of this node are # 56 # known, and stored in a .dep file. For each dependency in that file, there # 57 # are three cases: # 58 # - the weight of the edge leading to that dependency is higher than # 59 # requested. This dependency is discarded (some information printed) # 60 # - the weight of the edge is lower or equal to requested, but the node # 61 # has already been visited (the .dep file exists). Discard too (some # 62 # information printed) # 63 # - the weight of the edge is lower or equal to requested, and the node # 64 # has not been seen: then the dependencies of that node are generated, # 65 # and there are two cases: # 66 # - the node has no dependencies: just create an empty .dep file, so # 67 # that we know the node has been visited # 68 # - the node has dependencies: call generate_subgraph for that node # 69 # # 70 # This function takes four parameters: # 71 # - The node filename: this is the only one useful for the algorithm # 72 # - The depth: number of steps starting from root (for pretty print only) # 73 # - The weight of the edge leading to that node (for printing) # 74 # - The qualifier (for printing) # 75 # # 76 # TODO: document other passes # 77 # TODO: needs also to document the .tree files # 78 # TODO: The following is obsolete # 53 79 # Circular dependencies: # 54 80 # # … … 84 110 $2 : weight of the edge leading to this node 85 111 $3 : depth (root is 1) 86 $4 : qualifier (a for after, b for before )112 $4 : qualifier (a for after, b for before, f for first) 87 113 externals: vars: DEP_LEVEL contains 1 if we want to build the 88 114 tree only for required dependencies, … … 91 117 for the requested packages, 92 118 4 if we want all the dependencies 119 (excluding external of course) 93 120 MAIL_SERVER contains the name of the MTA we want to use. 94 121 files: ../xsl/dependencies.xsl: stylesheet for creating the … … 121 148 esac 122 149 case $qualifier in 123 a) buildstring=runtime ;;124 b ) buildstring= ;;150 a) buildstring=runtime ;; 151 b|f) buildstring= ;; 125 152 esac 126 153 dep_level=$DEP_LEVEL … … 141 168 esac 142 169 case $build_of_dep in 143 a ) buildstring=runtime ;;144 b ) buildstring= ;;170 a ) buildstring=runtime ;; 171 b|f) buildstring= ;; 145 172 esac 146 173 # Has this entry already been seen? 174 # TODO: no there is no special case! 147 175 # We have a special case here: if the entry has been seen at depth > 2 148 176 # and now depth=2 and DEP_LEVEL=3, optional deps have not been processed.
Note:
See TracChangeset
for help on using the changeset viewer.