pkg lock

Steve O'Hara-Smith steve at sohara.org
Mon Sep 9 15:57:16 UTC 2019


On Mon, 9 Sep 2019 09:21:13 -0600
"@lbutlr" <kremels at kreme.com> wrote:

> Before I go off on a wild tear, a couple of quick questions.
> 
> If I want to prevent pkg update from overwriting a package I built from
> ports, I need to issue a pkg lock <port> first, then if I want to rebuild
> it with postmaster I pkg unlock <port>, rebuild/update the port, and then
> lock the port again, yes?

	Yes to all of that.

	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.

> And there is no one-step way to say via flags or something, unlock,
> rebuild, then lock at once?

	You could write a script :) It would be a nice addition to ports
make.

> Also, is there anyway to tell what has been installed via ports and what
> has been installed via pkg? Or better, what has been installed with
> custom options that differ from the pkg versions?

	I rely on 'that which is locked came from ports'.

-- 
Steve O'Hara-Smith <steve at sohara.org>


More information about the freebsd-questions mailing list