Bug #605 -- Conditional execution

Alex Potter spambin at apcuk.dyndns.org
Sun Feb 1 07:42:12 PST 2004

On Sun, 01 Feb 2004 08:03:14 -0700, Kevin P. Fleming thusly spake in
<401D1532.3050708 at linuxfromscratch.org>:
>> where <test> =[ [not]"shell test function expression" ]
>>        [[&& or || [not]]<package-built>package-name</package-built>]
>>        [[&& or || [not] ] <package-version condition="[eq | ge |le]">
>> 		3.1.2</package-version>]
> I hadn't considered adding <not>, but that would make sense, yes.

Please :)
> Yes, <then>/<else> are exactly the same as <stage> (in fact they are in 
> the same source file so they can share common code), except that they 
> are only invoked when the test result warrants.
>> I think your "implicit AND" may well prove to be a PITA.....
> Possibly, although even in the worst case someone could use:
> <if>
>    <or>
>      <test>...</test>
>      <test>...</test>
>    </or>
>    <then>
>       ...
>    </then>
> </if>
> I just have a feeling that most often if you want to have multiple 
> conditions in the <if> statement they would be chained together with 
> AND, and the "implicit" AND removes the need for adding an <and> element 
> everytime you need an <if> statement which has (for example) two conditions.

I think that's correct. As long as OR is implemented, the implicit AND
would probably save some typing :)

Alex Potter

The email address above is a spamtrap.
Please reply to alexp -at- apcuk -dot- dyndns -dot- org

More information about the alfs-discuss mailing list