[Starlingx-discuss] how to deal with loop dependent in building stage

Zhang, Xiao xiao.zhang at windriver.com
Mon Sep 20 03:46:32 UTC 2021


On 9/19/2021 1:48 PM, open infra wrote:
> Hi Xiao,
>
> I have checked the possibilities with Debian project.
> Here is the response from Debian dev to this issue. [1]
>
Great thanks for your kindly help!

These resolutions are too heavy and complex for us. Developers have to 
find method shrink the build depend package list to break the loop.

On my understanding, suppose source package A build depend on binary b, 
source package B build depend on binary package a. While both binary 
package a and b are released by Debian repository. Here we just add some 
packages into both A and B. I suppose we should

1) Build patched A based on original b and get a a-v1;

2) Use a-v1 build patched B get b-v1;

3) Use b-v1 build patched A again get a-v2;

4) Use a-v2 build patched B again get b-v2;

Then we just abandon v1 packages and use the v2 ones.

While the above is the easiest loop and seems not too hard to make it, 
but for some complex loop like I described in the first mail, it is 
really hard to make it.

And, Of course if we have other packages have no original binary 
packages can be used, we have to break the loop dependency manually as 
bootstrap does. That will be painful. :-(

Currently, we have no whole package list yet, thus we have no idea if we 
really have loop dependency in the future.

So I wonder if our original StarlingX(based on CentOS) do have such loop 
dependency issue? And if it has, what they are how they resolved it?


Thanks a lot!

Xiao

>
> [1] https://lists.debian.org/debian-devel/2021/09/msg00267.html 
> <https://urldefense.com/v3/__https://lists.debian.org/debian-devel/2021/09/msg00267.html__;!!AjveYdw8EvQ!KaJIz1wDBOtemtxYBvDyNBy5e-CyetG_0MowjUmBQdDE1XaPDGiCqnMVHsnfNdnQwyB9$>
>
> Regards,
> Danishka
>
>
> On Sat, Sep 18, 2021 at 2:35 PM open infra <openinfradn at gmail.com> wrote:
>
>     Hi Xiao,
>
>     May I know the package names? and arch of them?
>     Btw, there is a way to analyse circular dependent packages. [1]
>     Debian wiki has leff info about circular build but [2] has something.
>
>     In case of installation of fedora/centos/rhel, rpm -Uvh a.rpm
>     b.rpm will solve the problem.
>
>     [1] https://wiki.debian.org/CircularBuildDependencies
>     <https://urldefense.com/v3/__https://wiki.debian.org/CircularBuildDependencies__;!!AjveYdw8EvQ!KaJIz1wDBOtemtxYBvDyNBy5e-CyetG_0MowjUmBQdDE1XaPDGiCqnMVHsnfNXNTqspa$>
>     [2]
>     https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends
>     <https://urldefense.com/v3/__https://www.debian.org/doc/debian-policy/ch-relationships.html*binary-dependencies-depends-recommends-suggests-enhances-pre-depends__;Iw!!AjveYdw8EvQ!KaJIz1wDBOtemtxYBvDyNBy5e-CyetG_0MowjUmBQdDE1XaPDGiCqnMVHsnfNWiz_Q1Y$>
>
>     Regards,
>     Danishka
>
>     On Sat, Sep 18, 2021 at 12:24 PM Zhang, Xiao
>     <xiao.zhang at windriver.com> wrote:
>
>           Hi,
>
>
>         We are trying to construct basic environment for porting
>         starlingX on
>         Debian. While when I dealing with the build order of user space
>         packages, the loop dependent problem blocked me.
>
>         The easiest example: source package A build depend on B while
>         B is also
>         build depend on A. We can just build A, B, A, B and only use
>         the later
>         result.
>
>         A fairly complex example: A depends on B and C, B depends on D, C
>         depends on F, D depends on A and F. In this case there will be
>         three
>         cycles as below:
>
>         A->B->D->A, A->B->D->F->A, A->C->F->A . Even more, if in some
>         cases we
>         needn't B or D, then we have only one cycle: ACFA
>
>         I tried to find a method to deal with it but failed.
>
>         So I wonder how did we deal with such loop dependent before,
>         on CentOS.
>         Any advises about it?
>
>
>         Thanks a lot
>
>         Xiao
>
>
>         _______________________________________________
>         Starlingx-discuss mailing list
>         Starlingx-discuss at lists.starlingx.io
>         http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
>         <https://urldefense.com/v3/__http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss__;!!AjveYdw8EvQ!KaJIz1wDBOtemtxYBvDyNBy5e-CyetG_0MowjUmBQdDE1XaPDGiCqnMVHsnfNRZQicM9$>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20210920/01823428/attachment.htm>


More information about the Starlingx-discuss mailing list