[wpkg-users] [Bug 244] New commands syntax leads to exception

Stefan Pendl stefan.pendl.71 at gmail.com
Sun Oct 16 18:50:24 CEST 2011


Hi Stefan,

On 16.10.2011 18:36, Stefan Pendl wrote:
> The new syntax allows shortening some very long lines of mine, so this is an improvement not having to scroll sideways.
>
> I assume the following would be possible now with the new condition node.
>
> Legacy:
>
> <install cmd='%ComSpec% /c if /i not %COMPUTERNAME% == "AnyHost" Install.exe '/>
>
> New:
>
> <install cmd="Install.exe">
>    <condition>
>      <check type="logical" condition="not">
>        <check type="host" condition="hostname" value="AnyHost"/>
>      </check>
>    </condition>
> </install>

Well yes, the <install /> command in the example will simply be ignored on 
"AnyHost". So the result should be identical in both cases. With the difference 
that in the "new" syntax WPKG wouldn't execute anything at all on "AnyHost" 
while in the "Legacy" syntax it would launch cmd.exe in any case.

Theoretically it is also possible to include different checks and commands 
within the same package for different systems.

Of course it also provides a lot of potential for "broken" commands and 
unexpected results. Like for example assigning a package to a host and then use 
conditions which will omit some commands or checks.

Well, if somebody is willing to use this complexity it is supported now. 
Otherwise very simple packages are still supported.


br,
Rainer




More information about the wpkg-users mailing list