Subject: Boolean variables (was: Re: improved pkg-vulnerabilities checking)
To: Jeremy C. Reed <reed@reedmedia.net>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 11/16/2005 12:48:52
Jeremy C. Reed wrote:
> On Mon, 14 Nov 2005, Eric Haszlakiewicz wrote:
>
>>>> +SKIP_AUDIT_PACKAGES= #defined
>>>
>>>
>>> Why not "yes" instead of "#defined"?
>>
>> uh, just 'cause? :-) I suppose "yes" is a little more readable.
>
>
> Just in case someone/something sets SKIP_AUDIT_PACKAGE=no it won't be
> assumed to mean yes. (This happens with misusing GNU_CONFIGURE=no for
> example.)
I see that this can lead to confusion. To resolve this, the way I prefer
most would be not to use
.if defined(VAR)
when checking for boolean variables, but to use
.if defined(VAR) && !empty(VAR:M[Yy][Ee][Ss])
The other thing is: As soon as a package has successfully passed the
pkglint check without errors and warnings, the chance for remaining bugs
of this kind is very small, as the commonly used variables are already
checked for this.
Currently there are only 46 warnings of this kind left in the complete
pkgsrc tree (without wip).
Roland