Using pkgng, but building some ports with custom options

Jim Ohlstein jim at
Mon Jan 6 14:12:31 UTC 2014


On 1/6/14, 8:49 AM, John Rogers wrote:
> Hello.
> I'm looking into switching to using pkgng once FreeBSD 10 is released.
> I must say that I'm very impressed so far after playing around with
> it, but I have run into a question that I have been unable to find the
> answer to. Is it possible to use pkg install from for
> most packages, use portmaster locally for some packages when I want to
> use custom build options and have it all work well together?
> A typical scenario that I want to avoid is that I have a custom built
> installation of port A. Then one day the package is updated to a new
> version on, which overwrites my local install when I
> run pkg upgrade.

I think "pkg lock " is what you want.

 From man page for pkg(8):

" lock    Prevent modification or deletion of a package."

So something like:

# pkg lock packagename

should do the trick.

I'm not certain, but you may need to remove the lock in order to upgrade 
it from ports, or do a forced re-installation.

> I have searched for this and found lots of information but no clear answer.
> John

Jim Ohlstein

More information about the freebsd-questions mailing list