On 2013-9-19 15:34 , [email protected] wrote:
>>> +if {$subport != "aqbanking5-svn"} {
>> == and != are for numeric comparisons. For string comparisons, you should 
>> use eq or ne. (Yes, this issue is pervasive and needs to be fixed in a lot 
>> of ports.)
> 
> Thanks for spotting this one!
> Changed in r111344.
> 
> Crazy that even "port lint --nitpick" didn't find this!!!
> 
> I suggest to improve the lint command to avoid stuff like this in the future.
> 
> (Still, it seems to have worked with "!=" as well.)

Yes, it does work. Those are not numeric comparison operators only, they
are general purpose comparison operators which favour numeric comparison
when the operands can be interpreted as numbers.

So it's not really an issue at all in a case like this, but certainly
it's preferable to use an explicit string comparison when that's what
you want.

- Josh
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to