pkg lock

Polytropon freebsd at
Mon Sep 9 20:31:02 UTC 2019

On Mon, 9 Sep 2019 10:10:08 -0600, @lbutlr wrote:
> On 9 Sep 2019, at 09:56, Steve O'Hara-Smith <steve at> wrote:
> > It is perhaps worth mentioning the benefits of make missing to get
> > a list of dependencies before compiling a port so that you can
> > minimise what gets compiled by installing the dependencies first
> > (make missing | xargs pkg install -A) or thereabouts.
> Thanks for this, I had no idea this existed. Will read some man pages.

Of course "man 7 ports" is a good point to start.

The "make missing | xargs pkg install" trick is known for a long time,
and it was also used before pkg (i. e., with pkg_add), especially on
systems where installing a binary package was faster than compiling
stuff yourself.

But note: It _might_ be possible that if you select an option in port
A, its dependency port B might need a custom option, too, and additionally
port C needs to be installed - nothing of that applies when you leave
the default options intact. That's why it's important that you test
your software before declaring "all done". ;-)

> > I rely on 'that which is locked came from ports’.
> Yes, going forward that will work fine, but starting off… not so much.

When you start, all options are the default options. Change something,
remember to lock the package (!), and this approach works just right. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list