Date: Thu, 18 May 2006 00:42:41 +1000 From: Paul Koch <paul.koch@statseeker.com> To: ports@freebsd.org, Vivek Khera <vivek@khera.org> Subject: Re: Is it safe to compile multiple ports at the same time ? Message-ID: <200605180042.42413.paul.koch@statseeker.com> In-Reply-To: <66F2413E-5D81-4BD6-B842-104A449E4753@khera.org> References: <200605171353.37745.paul.koch@statseeker.com> <20060517060026.GA40653@qlovarnika.bg.datamax> <66F2413E-5D81-4BD6-B842-104A449E4753@khera.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 May 2006 11:50 pm, Vivek Khera wrote: > On May 17, 2006, at 2:00 AM, Vasil Dimov wrote: > > Ofcourse if B depends also on Y it can fallback to building Y if it > > cannot gain exclusive lock on X. > > If you do that, then you get a lock on Y, which may also happen to be > a dependency of X, and now you have deadlock. > > You also need to ensure that all ports specify dependencies in the > same order (or at least take the locks in the same order) else you > will deadlock at some point if you allow the port to take more than > one lock at a time. Yer, it could get very complex if you allowed it to go onto another dependency port. Best to keep it simple and just block waiting for the lock on X. I assume there will never be some type of circular dependencies in the ports either. My original thinking was just a simple locking setup, because I often setup new machines by doing a release install, cvsup to -stable and ports, build/install world/kernel, xorg, kde, openoffice, gvim, browers, etc... and have to do them one at a time instead of firing up lots of port builds and coming back a few days later :) I was wondering if the locking mechanism should be added as a standard bit of functionality to "make". I am surprised it doesn't have it already. For example, add another reserved keyword like "LOCK" or ".LOCK", and if it is set in the makefile, or one of its included files (eg. bsd.ports.whatever) then it gets an exclusive lock. Maybe even be verbose about it - try getting a non-blocking lock and if it fails then print a message and go for a blocking lock. Just a thought. Paul.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605180042.42413.paul.koch>