[oe] Simultaneous build of two intree packages

Ulf Samuelsson openembedded at emagii.com
Tue May 8 21:31:58 UTC 2012


On 2012-05-07 14:33, Radek Dostal wrote:
> On Mon, 2012-05-07 at 06:02 -0600, Gary Thomas wrote:
>> On 2012-05-07 05:54, Radek Dostal wrote:
>>> Dear All,
>>>
>>> I have three intree recipes A, B and C which are part of the same layer.
>>> =>   B depends on A
>>> =>   C depends on A.
>>>
>>> There is no dependency between B and C. Only important thing is that B
>>> and C are not build simultaneously. This is not a problem unless I use
>>> configure BB_NUMBER_THREADS>   1. Than builds B and C starts to collide
>>> and produce mess because they are both intree builds.
>> What are you doing that makes these clash?
> usually it crashes during "ln -sf target dest" which is executed
> simultaneously with same parameters for both builds. There are other
> issues as well in addition to this ln issue.
>
>>> Is there something like a mutex/lock mechanism in openembedded-core,
>>> which would forbid two recipes to be build simultaneously?
>> Just make C depend on B
> I have already considered this, but unfortunately I also have
> configurations where only B is included or where only C is included :(
>
> Thanks,
> Radek
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Fixing the packages, is probably the way to go.
You could also create pseudo package "D" which is available in several 
versions.

Package D-1.0c:      Package D is depending on nothing
Package D-1.0bc:    Package D is depending on B

Package C is always dependent on Package D and A.
Package B is always dependent on Package A

If you set PREFERRED_VERSION_D = "1.0c"
C is depending on D, which is depending on nothing, and C is depending on A.
No problem, A and C is built.

If you set PREFERRED_VERSION_D = "1.0c"
C is depending on D, which is depending on B.  B and C is depending on A.
A is built, then B is built, and then D finalizing with C.

If you only want B, don't include C in the image.

Not tested, but it looks like it would work.

-- 
Best Regards
Ulf Samuelsson
ulf at emagii.com
+46 722 427437





More information about the Openembedded-devel mailing list