Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2006 15:08:07 +1000
From:      Paul Koch <paul.koch@statseeker.com>
To:        Edwin Groothuis <edwin@mavetju.org>
Cc:        ports@freebsd.org
Subject:   Re: Is it safe to compile multiple ports at the same time ?
Message-ID:  <200605171508.07228.paul.koch@statseeker.com>
In-Reply-To: <20060517045403.GI1113@k7.mavetju>
References:  <200605171353.37745.paul.koch@statseeker.com> <20060517045403.GI1113@k7.mavetju>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 May 2006 02:54 pm, Edwin Groothuis wrote:
> On Wed, May 17, 2006 at 01:53:37PM +1000, Paul Koch wrote:
> > Is it safe to compile multiple ports at the same time and not get
> > the makes to run into each other when building dependency ports ?
>
> I once submitted a patch which checked for this. Now that I've
> learned about lockf(1) I think there is a chance a next one will
> be approved too!
>
> Edwin

So.... it would be nice to have some type of locking in the ports build.  
For example, when a make enters /usr/ports/{category}/{port}, it gets 
an exclusive lock on that port (maybe on the Makefile itself, or a 
specific lock file) before it attempts to build/install the port.  It 
could be done by using lockf, but that just forks more processes, and 
there are already lots of them. I'd dare to say.... maybe it could be a 
function of make itself. As in, extend make so it understands a new 
keyword that makes it get an exclusive lock, using flock(2).  

With locking, you should then be able to fire off lots of port builds 
and use up all those cpu cores :)

	Paul. 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605171508.07228.paul.koch>