[wpkg-users] Install commands and conditions

Nicolas BRICHE nbriche at ch-peronne.fr
Tue Oct 22 12:06:51 CEST 2013


Hello all,

So since 1.3 we can put check conditions in install/upgrade/etc commands.  This
is great, and I've taken advantage of it.

One particular case I've got a problem with, though, is cascading commands.  For
exemple, with Adobe Reader 11.0.5, I must:

- Install the full .msi if Adobe Reader is absent,
- Install the latest quarterly if Adobe Reader's patch level is < 11.0.4,
- Install the latest patch if patch level's < 11.0.5

So I thought I'd do this:

<variable name="version" value="11.0.05" />
<check type="uninstall" condition="exists" path="Adobe Reader XI (%version%) +." />

<install cmd='INSTALL_READER_MSI'>
  <condition>
    <check type="logical" condition="not">
      <check type="uninstall" condition="exists" path="Adobe Reader XI +." />
    </check>
  </condition>
</install>

<install cmd='INSTALL_READER_QUARTERLY' >
  <condition>
    <check type="uninstall" condition="versionsmallerthan" value="11.0.04"
path="Adobe Reader XI +." />
  </condition>
</install>

<install cmd='INSTALL_READER_PATCH' >
  <condition>
    <check type="uninstall" condition="versionsmallerthan" value="11.0.05"
path="Adobe Reader XI +." />
  </condition>
</install>

The MSI installs if it's not already there; when we're certain the .msi is
there, the second command checks if the quarterly needs to be installed, then
the third checks if the .5 patch needs to be installed.

WPKG installs the MSI OK, but fails the rest.  Reading the log, it looks like
all the checks for all the commands are made _before_ any command is executed.

So if a command has checks depending on the results of the previous command, the
chain fails.  In my exemple, the quarterly won't install because the condition
was evaluated before the .msi executed.

Is there a way to do the condition checking only when its command is evaluated,
so that WPKG checks the actual state of the system?


Cordialement,

Nicolas BRICHE
Service Informatique
Centre Hospitalier de Péronne



More information about the wpkg-users mailing list