From owner-freebsd-ports@FreeBSD.ORG Wed May 17 12:31: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 3928B16A466; Wed, 17 May 2006 12:31:08 +0000 (UTC) (envelope-from fernan@iib.unsam.edu.ar) Received: from smtp.unsam.edu.ar (smtp.unsam.edu.ar [170.210.48.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E43643D72; Wed, 17 May 2006 12:30:58 +0000 (GMT) (envelope-from fernan@iib.unsam.edu.ar) Received: from omega.iib.unsam.edu.ar (omega.iib.unsam.edu.ar [192.168.10.14]) by smtp.unsam.edu.ar (8.12.6/8.12.6) with ESMTP id k4HCWjoh050227; Wed, 17 May 2006 09:32:45 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: from omega.iib.unsam.edu.ar (localhost [127.0.0.1]) by omega.iib.unsam.edu.ar (8.13.6/8.13.6) with ESMTP id k4HCUqFb057935; Wed, 17 May 2006 09:30:52 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: (from fernan@localhost) by omega.iib.unsam.edu.ar (8.13.6/8.13.3/Submit) id k4HCUpUo057930; Wed, 17 May 2006 09:30:51 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) X-Authentication-Warning: omega.iib.unsam.edu.ar: fernan set sender to fernan@iib.unsam.edu.ar using -f Date: Wed, 17 May 2006 09:30:51 -0300 From: Fernan Aguero To: Paul Koch Message-ID: <20060517123051.GB50791@iib.unsam.edu.ar> Mail-Followup-To: Paul Koch , vd@freebsd.org, ports@freebsd.org, Edwin Groothuis References: <200605171353.37745.paul.koch@statseeker.com> <200605171508.07228.paul.koch@statseeker.com> <20060517060026.GA40653@qlovarnika.bg.datamax> <200605171615.29000.paul.koch@statseeker.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200605171615.29000.paul.koch@statseeker.com> User-Agent: Mutt/1.5.11 Cc: ports@freebsd.org, vd@freebsd.org, Edwin Groothuis 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 12:31:10 -0000 +----[ Paul Koch (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