[jhalfs] branch trunk updated: ablfs: only test paths with DEP_LEVEL in path_to

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Sat, 21 Feb 2026 08:50:04 +0000
Newsgroups gmane.linux.lfs.automated
Message-ID <177166380486.28374.5876606613074467060@rivendell.linuxfromscratch.org>
This is a multi-part message in MIME format...

------------=_1771663808-1253-9398
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository jhalfs.

The following commit(s) were added to refs/heads/trunk by this push:
     new 5e1d852  ablfs: only test paths with DEP_LEVEL in path_to
5e1d852 is described below

commit 5e1d852b09ecc407692d846431eaf61ab27a43db
Author: Pierre Labastie <[email protected]>
AuthorDate: Sat Feb 21 08:54:45 2026 +0100

    ablfs: only test paths with DEP_LEVEL in path_to
    
    When treating "runtime" dependencies ("a" flag), we change the
    dependency chain as follows: suppose we have a chain like this:
    parent-b->node-a->rtchild
    We want rtchild to be built after node, but before parent, in case
    parent needs the functionality brought by rtchild when using node.
    so we create a new node "nodegroupxx", and generate the following
    dependency chain:
    parent-b->nodegroupxx-b->node
                        |-b->rtchild
    The problem is that if there is a path:
    rtchild-b-...-b->parent, we create a circular dependency, while
    we could as well consider building rtchild after parent (if there
    is such a circle, it ususally means parent does not need the
    functionality brought by rtchild). So we test the existence of
    such a path, and if it exist we remove nodegroupxx from the
    dependencies of parent; final state:
    nodegroupxx-b->node
              |-b->rtchild-b-...-b->parent
    and the build order is node, then parent, then rtchild, which is
    usually ok. But not always! suppose the path contains an optional
    dependency, but there is a dependency chain from one of the
    ancestors of parent to rtchild, we may break this chain when
    removing circular dependencies, while keeping only the
    optional one... So when looking for paths from rtchild to parent,
    never follow a path that has priority less than dependency level...
---
 BLFS/libs/func_dependencies | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BLFS/libs/func_dependencies b/BLFS/libs/func_dependencies
index ba5a3ab..5a3c92c 100644
--- a/BLFS/libs/func_dependencies
+++ b/BLFS/libs/func_dependencies
@@ -379,7 +379,7 @@ for node in $(grep -l ' a ' *.dep); do
       p=0 # No "after" dependency depends on this parent
       for start in $(grep ' a ' $node | cut -d' ' -f3); do
         seen=" " # global variable used in "path_to"
-        if path_to ${start}.dep ${parent%.dep} 3; then p=1; break; fi
+        if path_to ${start}.dep ${parent%.dep} $DEP_LEVEL; then p=1; break; fi
       done
       if test $p = 0; then
         b=1

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

------------=_1771663808-1253-9398
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
------------=_1771663808-1253-9398--