From owner-freebsd-ports@FreeBSD.ORG Wed May 17 05:08:26 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FE6A16A405 for ; Wed, 17 May 2006 05:08:26 +0000 (UTC) (envelope-from paul.koch@statseeker.com) Received: from wally.statseeker.com (wally.statscout.com [203.39.101.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DE5F43D45 for ; Wed, 17 May 2006 05:08:24 +0000 (GMT) (envelope-from paul.koch@statseeker.com) Received: from localhost (localhost [127.0.0.1]) by wally.statseeker.com (8.13.3/8.13.3) with ESMTP id k4H58N8Q033970; Wed, 17 May 2006 15:08:23 +1000 (EST) (envelope-from paul.koch@statseeker.com) Received: from wally.statseeker.com ([127.0.0.1]) by localhost (wally.statseeker.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 33366-08; Wed, 17 May 2006 15:08:16 +1000 (EST) Received: from speedy (speedy.statseeker.com [10.1.1.100]) (authenticated bits=0) by wally.statseeker.com (8.13.3/8.13.3) with ESMTP id k4H58BLV033965 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Wed, 17 May 2006 15:08:11 +1000 (EST) (envelope-from paul.koch@statseeker.com) From: Paul Koch To: Edwin Groothuis Date: Wed, 17 May 2006 15:08:07 +1000 User-Agent: KMail/1.8 References: <200605171353.37745.paul.koch@statseeker.com> <20060517045403.GI1113@k7.mavetju> In-Reply-To: <20060517045403.GI1113@k7.mavetju> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605171508.07228.paul.koch@statseeker.com> X-Virus-Scanned: amavisd-new at statseeker.com Cc: ports@freebsd.org Subject: Re: Is it safe to compile multiple ports at the same time ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: paul.koch@statseeker.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2006 05:08:26 -0000 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.