[wpkg-users] logical check "and"
Nicolas Briche
nbriche at free.fr
Sun Jan 17 17:24:45 CET 2016
Le 2016-01-17 11:31, Stefan Pendl a écrit :
> Am 15.01.2016 um 10:56 schrieb le dahut:
>> Hello.
>>
>> I've read :
>> http://wpkg.org/Packages.xml#Logical_Conditions
>> and :
>> http://wpkg.org/Logical_tests
>>
>> What is the difference between :
>> 1)
>> <check type="logical" condition="and" >
>> <check type="uninstall" condition="versiongreaterorequal"
>> path="Adobe Flash Player .+ ActiveX.*" value="%version_activex%" />
>> <check type="uninstall" condition="versiongreaterorequal"
>> path="Adobe Flash Player .+ NPAPI.*" value="%version_plugin%" />
>> </check>
>>
>> and :
>> 2)
>> <check type="uninstall" condition="versiongreaterorequal"
>> path="Adobe
>> Flash Player .+ ActiveX.*" value="%version_activex%" />
>> <check type="uninstall" condition="versiongreaterorequal"
>> path="Adobe
>> Flash Player .+ NPAPI.*" value="%version_plugin%" />
>> ?
>>
>> For what I've understood both do the same, the two checks must return
>> True for 1) or 2) to be True.
>>
>> So why use a "and" logical condition ?
>
> There is no difference.
>
> There might be some rare cases where you would need to force the AND
> condition to get the correct result.
>
> In my opinion the AND condition is only included for completeness,
> since I have never needed it.
True on root level for simple checks; but AND is still necessary for
more complex tests:
<ckeck or>
<check and>
<check />
<check />
</check>
<check and>
<check />
<check />
</check>
</check>
N.
More information about the wpkg-users
mailing list