Net-SNMP conflict

Drewery, Bryan bryan at
Thu May 29 23:41:11 UTC 2014

On Thu May 29 18:23:20 2014, Pete Carah wrote:
> On 05/20/2014 09:58 AM, Bryan Drewery wrote:
>> On 2014-05-20 04:18, Pete Carah wrote:
>>> PLEASE don't automatically install pkg during the build of ANY other
>>> package; if this happens in the middle of a portupgrade -a on a system
>>> without pkgng, the result is not pretty; all packages built after
>>> net-snmp have a duplicated origin, among other things.  I hope I can
>>> recover the system since it is supposed to be a production server.
>>> Yes, I realize I'll have to convert.  However, this forced install
>>> doesn't convert the database so the pkg database and /var/db/pkg end up
>>> inconsistent, and I can't tell what is really installed on all of the
>>> packages that show a duplicated origin.
>>> -- Pete
>> (portupgrade maintainer and pkg developer here)
>> Having pkg installed should be perfectly safe. Portupgrade, nor the
>> ports framework, consider pkg installed as "converted". All packages
>> will continue to be registered in the old format unless you run
>> pkg2ng or 'pkg install' or add WITH_PKGNG=yes to your make.conf.
>> Can you please elaborate on what the "duplicated origin" issue
>> is?
> The way net-snmp installed pkg also activated it without doing a pkg2ng;
> since this happened
> in the middle of a portupgrade part of the portupgrade kept its records
> the old way and the rest
> the new way without any of the old ports in the database.  This made a
> lot of things build twice.
> Not very nice...

Have you ran pkg2ng since then? None of this sounds right to me. If
you have not yet ran pkg2ng then we can debug it. Otherwise it's too

If not, I'd  like to see the output of 'pkg info' and:

PACKAGESITE=file:///nonexistent pkg info -x 'pkg(-devel)?$'

It is very much intended that installing pkg or having it pulled in via
net-snmp will not run pkg2ng. Portupgrade should be flipping over
to using pkg unless pkg has itself registered - which can't happen
without WITH_PKGNG set in the environment or make.conf.

>> net-snmp also should (if I remember the code I reviewed right) be
>> only considering the new package database if it has packages in it,
>> meaning not until you pkg2ng or 'pkg install'.
> No, the way I read the makefile lines in question it installed it if it
> wasn't already
> installed..  See:

I am referring to the runtime of net-snmp, not the port.

> # pkg-1.2 cannot handle this dependency well.
> .if !defined(WITH_PKGNG)
> LIB_DEPENDS=${PORTSDIR}/ports-mgmt/pkg
> .endif
> This will install if it is there or not, but only if it is NOT in use.
> Probably not what was
> intended.
> -- Pete

More information about the freebsd-ports mailing list