Subject: Re: Determening if a package is installed?
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Jan Danielsson <jan.m.danielsson@gmail.com>
List: pkgsrc-users
Date: 05/02/2007 05:23:53
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig29AE4FDCE5BA6BC861864774
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).
>>
>=20
> Try this:
>=20
> 	cd /usr/pkgsrc/$x && make show-var VARNAME=3DPKGNAME
>=20
> 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!

--=20
Kind regards,
Jan Danielsson



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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFGOARQuPlHKFfKXTYRCib1AKCZAIu4ik+KlWq5tCR+EA9oR/+byQCeM9+o
/Fq+xgvutkYWX3WnwxDAL1s=
=vprK
-----END PGP SIGNATURE-----

--------------enig29AE4FDCE5BA6BC861864774--