[110954] trunk/dports/_resources/port1.0/group/apache2-1.0.tcl

Joshua Root jmr at macports.org
Wed Sep 11 02:13:45 PDT 2013


On 2013-9-11 17:56 , Ryan Schmidt wrote:
> On Sep 10, 2013, at 23:05, pixilla at macports.org wrote:
> 
>> +proc apxsInstall { moduleName activate dylibs } {
> 
>> +    if { ${activate} == "yes" } {
>> +            exec "${apache.sbindir}/a2enmod" ${moduleName}
>> +    }
> 
> If $activate is supposed to be a boolean-type variable, then it should be checked using the [tbool] procedure, not by checking for string equality with "yes".

But tbool itself does a string comparison. The point of tbool is that it
works on possibly-nonexistent variables (and considers ones that don't
exist to be false).

If activate will always exist and be a boolean, then this is fine:
if {$activate} { ... }

- Josh


More information about the macports-dev mailing list