diff options
author | Pierre Labastie <pierre.labastie@neuf.fr> | 2021-12-19 17:26:23 +0100 |
---|---|---|
committer | Pierre Labastie <pierre.labastie@neuf.fr> | 2021-12-19 17:30:10 +0100 |
commit | 141d072bf6b54a3eef0e6ad04cfb2b6c1ae6606c (patch) | |
tree | cde12b9f320e676ab516e3f8bb1f3f1d581e3b35 | |
parent | a78cfc961eb903d90e86d4945aa7425fe83aaac1 (diff) |
BLFS Dependencies: Fix pass2 not run
With the way we manage "first" deps, it may happen that no node
unreference the pass2 node. In that case, we add it to root.
Add some documentation for what we do for those deps, too.
-rw-r--r-- | BLFS/libs/func_dependencies | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/BLFS/libs/func_dependencies b/BLFS/libs/func_dependencies index 6a45525377..6a7f30e608 100644 --- a/BLFS/libs/func_dependencies +++ b/BLFS/libs/func_dependencies @@ -298,6 +298,13 @@ clean_subgraph() { # the name of the group is chosen so that it is unlikely as a package name (so that it is removed when building the xml book). + Also change the "first" qualifier so that a cycle: + A -first-> B ---chain---> A becomes: + B ---chain---> A -before-> B-pass1 + and we remove all the dependencies which have a chain to + A in B-pass1. + Since we do not change anything else, it may happen that + nothing depends on B. In that case, B is appended to root. input vars: None files: <node>.dep files containing dangling edges and "after" qualifiers @@ -396,6 +403,9 @@ for node in $(grep -l ' f ' *); do } <$node for id_of_dep in $lines_to_change; do sed "/\ $id_of_dep\$/"'{s/[[:digit:]] f /1 b /;s/$/-pass1/}' -i $node + if ! grep -q " $id_of_dep\$" *.dep; then + echo 1 b $id_of_dep >>root.dep + fi done done } # End clean_subgraph |