How to determine installed package version

Lowell Gilbert freebsd-stable-local at
Fri Nov 14 05:59:54 PST 2003

Boris Kovalenko <boris at> writes:

>     I'm sorry if I'm writing wrong list.

Right.  I'm sending this to the ports list.

>                                          I'm a Quagga port maintainer
> and want to simplify user selection of SNMP lib via DIALOG. As I
> found, there are only to ports of SNMP lib for FreeBSD - NetSNMP v5
> and old UCD-SNMP v4. I want to check what version of SNMP lib user
> have installed and precheck apropriate option. Is there a RIGHT way to
> do that?

This is covered, somewhat, in the Porters' Handbook: did you check

I'd expect it to work the same way as dependencies, in the sense that
(and only the sense that) you would key it off of the actual library
file installed by the port you're wondering about.  Then you should be
able to just include a script that runs from an early dependency and
hook, to configure the options defaults. 

You may have to be careful with IS_INTERACTIVE, too.

More information about the freebsd-ports mailing list