Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2007 22:34:06 -0500
From:      Yoshihiro Ota <ota@j.email.ne.jp>
To:        Erik Trulsson <ertr1013@student.uu.se>
Cc:        Lovett <ade@FreeBSD.org>, Ade, Steven Kreuzer <stevenkreuzer@yahoo.com>, freebsd-ports@freebsd.org
Subject:   Re: Limitations of Ports System
Message-ID:  <20071214223406.19f08339.ota@j.email.ne.jp>
In-Reply-To: <20071213205857.GB72545@owl.midgard.homeip.net>
References:  <475F7390.9090509@gmail.com> <1022BEDA-8641-4686-AB1A-3FE2D688F47F@FreeBSD.org> <475FAC1F.1010401@gmail.com> <19341C6C-BF3A-4DFD-B8DF-87F4E92B0335@FreeBSD.org> <0F330142-A3CA-4E6E-84BD-FDE55A8E3AEE@yahoo.com> <20071213205857.GB72545@owl.midgard.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Dec 2007 21:58:57 +0100
Erik Trulsson <ertr1013@student.uu.se> wrote:

> One shortcoming is the lack of locking making parallell builds a bit unsafe.
> If you try to build both port A and port B at the same time, and both A and
> B depends (directly or indirectly) on port C which is not installed, then
> you can esily end up having two processes both trying to build C at the same
> time.  This usually confuses both builds very badly making them fail.
> 
> I also don't think there is any locking on /var/db/pkg making possibly
> somewhat unsafe trying to register the installation of two ports/packages at
> the same time.  I have never noticed any actual problems with this though.
> 
> 
> Some sort of locking, making parallel builds safe, should be possible to
> add to the ports system without doing any sweeping changes.
> (I did look briefly at the makefiles, but did not find any obvious place
> to put the locking.  I probably just did not look hard enough.)

The ports system is to "install" a new port.  It won't be easy to accomplish
what you suggest.  For example, dependencies are checked one at a time.
So, even if you want to run multiple processes on LIB_DEPENDS, there is no
easy way to control CPU load.

It is a better idea for other "ports UPGRADE" utilities to take care of your
suggestions.  Indeed, I have been developing such utility myself.  If you
want to try, I can give out for testing.  There are 2 known issues with my
tool, yet: 1. no good way to run 'make config', yet, and 2. even if
less LIB_DEPENDS are required due to less selected OPTIONS, my tool does
not fully eliminate these dependencies.

Hiro



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071214223406.19f08339.ota>