From owner-freebsd-ports@FreeBSD.ORG Wed May 17 06:13:08 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 4C5C816A407; Wed, 17 May 2006 06:13:08 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail2out.barnet.com.au (mail2out.barnet.com.au [202.83.176.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FD6B43D48; Wed, 17 May 2006 06:13:06 +0000 (GMT) (envelope-from edwin@mavetju.org) Received: by mail2out.barnet.com.au (Postfix, from userid 27) id 125787073BA; Wed, 17 May 2006 16:13:05 +1000 (EST) X-Viruscan-Id: <446ABEF100011EF46B9D7E@BarNet> Received: from mail2-auth.barnet.com.au (mail2.barnet.com.au [202.83.176.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.barnet.com.au", Issuer "*.barnet.com.au" (not verified)) by mail2.barnet.com.au (Postfix) with ESMTP id C23337073D3; Wed, 17 May 2006 16:13:04 +1000 (EST) Received: from k7.mavetju (unknown [10.251.1.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail2-auth.barnet.com.au (Postfix) with ESMTP id 183437073D1; Wed, 17 May 2006 16:13:04 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id A945D2B3; Wed, 17 May 2006 16:13:02 +1000 (EST) Date: Wed, 17 May 2006 16:13:02 +1000 From: Edwin Groothuis To: Vasil Dimov Message-ID: <20060517061302.GR1116@k7.mavetju> References: <200605171353.37745.paul.koch@statseeker.com> <20060517045403.GI1113@k7.mavetju> <200605171508.07228.paul.koch@statseeker.com> <20060517060026.GA40653@qlovarnika.bg.datamax> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060517060026.GA40653@qlovarnika.bg.datamax> User-Agent: Mutt/1.4.2.1i Cc: ports@freebsd.org, Paul Koch 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 List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2006 06:13:08 -0000 On Wed, May 17, 2006 at 09:00:26AM +0300, Vasil Dimov wrote: > Not really, locking will just prevent breakages. Let me illustrate my > thought with an example: > > 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? You have to obtain a lock on the X's Makefile before you are doing to check if you have this port installed. For example, a dependcy on pkg-config in the directory devel/pkgconfig: - obtain lock on devel/pkgconfig/Makefile - check if pkg-config exists, and if not, build and install it. - release lock on devel/pkgconfig/Makefile > Ofcourse if B depends also on Y it can fallback to building Y if it > cannot gain exclusive lock on X. Building one port is a serial process, building multiple ports can be a parallel process. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/