Subject: Re: boolean variables in pkgsrc
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 02/12/2005 10:39:46
--T7mxYSe680VjQnyC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Feb 11, 2005 at 07:57:46PM +0100, Julio M. Merino Vidal wrote:

> Or maybe add some extra logic (wherever needed, maybe defaults/mk.conf)
> to check if one of those variables is defined and, in that case, set it
> to yes.  I.e.,
>=20
> .if defined(PKG_DEVELOPER) && empty(PKG_DEVELOPER)
> PKG_DEVELOPER=3D yes
> .endif
>=20
> We'd then deprecate these constructions after a branch or two.

the only issue I can see is that without having the above, some
targets won't show you anything different for an empty variable vs. an
undefined variable, eg. show-vars. this still gets me occasionally,
and it will bite an unsuspecting user very easily unless it is
perfectly clear.

if this is done, I would be in favour of either choosing a
capitalization and sticking to it, or using something like the above
permanently, so that any possible ambiguity is nullified.

grant.


--T7mxYSe680VjQnyC
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFCDUJCluYOb9yiFXoRAp04AJ99utLA/3ujl6E+GabaP19tkMLoLACgicSE
hwZ5nrGGkE7idHclKbZ/V9E=
=JFNE
-----END PGP SIGNATURE-----

--T7mxYSe680VjQnyC--