Limitations of Ports System

Erik Trulsson ertr1013 at
Thu Dec 13 12:59:00 PST 2007

On Thu, Dec 13, 2007 at 10:42:43AM -0500, Steven Kreuzer wrote:
> This thread was called "results of ports re-engineering survey" but I 
> figured I would start a new thread.
> On Dec 12, 2007, at 6:45 AM, Ade Lovett wrote:
>> We *know* it can be done better.  We *know* the scaling limits of the 
>> current system, and most of us are completely amazed it even still works.
>> If y'all want to make a difference, concepts and ideas we have plenty of.  
>> Code talks.
> Out of curiosity, are any of these shortcomings documented anywhere? I have 
> been using ports on my home machine for a long time and I've never
> had any problems with it. I assume the issues come into play when you work 
> with multiple systems you are trying to keep in sync, etc.
> I would be interested in reading about some of the limitations people have 
> run into when using ports.

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.)

<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at

More information about the freebsd-ports mailing list