Subject: Re: Determening if a package is installed?
To: Steven M. Bellovin <>
From: Jan Danielsson <>
List: pkgsrc-users
Date: 05/02/2007 05:23:53
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Steven M. Bellovin wrote:
>>    The problem I keep running into is that I am unable to determine
>> if a package is installed using the pkgsrc path. Everything assumes
>> that I have the package name, which isn't always true (for instance,
>> the installed package is called py24-psycopg2).
> Try this:
> 	cd /usr/pkgsrc/$x && make show-var VARNAME=3DPKGNAME
> You may have to use a regular expression to strip off the version
> suffix; for my scripts, I don't need to.

   Exactly what I was looking for. Many thanks!

Kind regards,
Jan Danielsson

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG v1.4.7 (NetBSD)