Matching a name to a port

Jacques A. Vidrine nectar at
Mon Sep 13 10:48:08 PDT 2004

On Mon, Sep 13, 2004 at 01:33:22PM -0400, Dan Langille wrote:
> I'm trying to match vuln.xml information against actual ports.  To do
> this, I need to know how the entries in the <name> field are derived.
> I first thought it might be PORTNAME.  But that's not the case.  I now
> think it might be ${PKGNAMEPREFIX}${PORTNAME}$.


See the definition of PKGNAME in  It is PKGNAME minus the
version information.

> If am i correct, then I have some questions about the following entries.
> What ports do the following refer to?
>  iaskmpd

>  ImageMagick-nox11

>  ja-netscape7

>  libtool
depends, could be devel/libtool13 or devel/libtool15, or even the
no-longer-existent devel/libtool or devel/libtool14

>  mod_php4-twig

>  mpg123-esound
>  mplayer-esound
>  mplayer-gtk
>  mplayer-gtk-esound

>  mysql-client
>  mysql-scripts
>  mysql-server
depends, could be any of the database/mysql*-(client|scripts|server) ports.

> The answers may be obvious to the trained eye, but how does one write code
> against this?

Ports are re-named, moved, removed.  I'm not sure that it can be
done exactly other than by what I suggested previously: a database
of the "history" of package names.  IIRC, portupgrade uses ad hoc
heuristics to guess the port origin from the package name, when the
ORIGIN comment is not usable for some reason.

The dichotomy of package name and port origin has always been a
troublesome aspect of the FreeBSD Ports collection :-(

Jacques Vidrine / nectar at / jvidrine at / nectar at

More information about the freebsd-vuxml mailing list