Date: Wed, 17 May 2006 09:30:51 -0300 From: Fernan Aguero <fernan@iib.unsam.edu.ar> To: Paul Koch <paul.koch@statseeker.com> Cc: ports@freebsd.org, vd@freebsd.org, Edwin Groothuis <edwin@mavetju.org> Subject: Re: Is it safe to compile multiple ports at the same time ? Message-ID: <20060517123051.GB50791@iib.unsam.edu.ar> In-Reply-To: <200605171615.29000.paul.koch@statseeker.com> References: <200605171353.37745.paul.koch@statseeker.com> <200605171508.07228.paul.koch@statseeker.com> <20060517060026.GA40653@qlovarnika.bg.datamax> <200605171615.29000.paul.koch@statseeker.com>
next in thread | previous in thread | raw e-mail | index | archive | help
+----[ Paul Koch <paul.koch@statseeker.com> (17.May.2006 03:21): | | > port A depends on X | > port B depends on X | > | > You start building A which results in building X via exclusive lock | > on X. During the build of X you decide to build B which results in | > building X (X is not yet installed) but you block trying to acquire | > the exclusive lock on X so you wait _idling_ until building of X is | > done. Furthermore what do you suggest to do when the lock is | > released? | > | > Ofcourse if B depends also on Y it can fallback to building Y if it | > cannot gain exclusive lock on X. | | Yes, breakage is the main problem. | | When the lock is released, then the second make will immediately see | work/.build_done.XXXXXXX is present ??, maybe, provided the other build process didn't clean everything after itself (ie. make clean) but alternatively it could check /var/db/pkg if the requirement is for the dependency to be installed. And now that we're here ... are there any ports that depend on another port to be built but not installed (ie to link against something in WRKSRC?) ... this could provide a nice test case ... do you check work/.build_done*? /var/db/pkg? Suppose this situation: as part of the build process for A, port X gets locked (building of X starts). now port B, that also depends on X (but needs to access WRKSRC) fails to get a lock on X, and sits waiting ... how can we prevent that the 'clean' target of port X gets called (even if it was specified)? We don't care? OK, so perhaps the user knows what he's doing and doesn't do a 'make clean' if he's launching several port builds ... |then return successfully to the | make which called it. I haven't looked to see how it works under the | hood though. | | Yep, in your example above, it won't be any faster. But what if I want | to do something like: | | port A depends on Q R S T X | port B depends on D E F G X | | then lots of simultaneous building can occur until they both hit port X. | +----] Yes, this is one of the benefits of the locking strategy. This, together with the safety benefit of knowing that the WRKSRC of a build in progress won't be nuked when you do a 'make clean' in a separate port are the two main reasons why this is a yes/yes for the ports system. IMO Fernan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060517123051.GB50791>