[wpkg-users] How to deploy patches to a software, which is already installed?

Nicolas Briche nbriche at free.fr
Tue Feb 10 20:27:37 CET 2015


 

Le 2015-02-10 16:42, Holger Kröber a écrit :

> Is it ok, to put all the patches in one package or is it better to
> create a package for every patch (i would prefer one big package,
> since there are >10 patches)?

One package should be OK. I install PCs the same way you do (basically).
I use "super-packages" for things like Adobe Reader, which _demands_
multiple patches in sequences.

Here's my current Adobe Reader package:

<package
 id="adobereader"
 name="Adobe Reader"
 revision="%version%"
 priority="50">

 <variable name="version" value="11.0.10" />
 <variable name="PKG_ATT" value="SUPPRESS_APP_LAUNCH=YES
AgreeToLicense=Yes ALLUSERS=1" />
 <variable name="LCID" value="1036" /> <!-- 1034 Spanish ; 1031 Deutsch
-->

 <check type="uninstall" condition="versiongreaterorequal"
value="%version%" path="Adobe Reader XI .+" />

 <!-- Install with the MSI -->
 <commands>

 <command type="install" cmd='cscript %CHECKPROC% AcroRd32.exe' />
 <command type="install" cmd='msiexec /qn /i
"%SOFTWARE%Outils_BureautiqueadobereaderAdbeRdr11000_fr_FR.msi"
TRANSFORMS="%SOFTWARE%Outils_Bureautiqueadobereaderar11-chp.mst"
%PKG_ATT%'>
 <condition>
 <check type="logical" condition="not"><check type="uninstall"
condition="exists" path="Adobe Reader XI .+" /></check>
 </condition>
 <exit code="0" />
 <exit code="3010" reboot="false" />
 </command>
 <command type="install" cmd='msiexec /qn /update
"%SOFTWARE%Outils_BureautiqueadobereaderAdbeRdrUpd11004.msp"' >
 <condition>
 <check type="logical" condition="or">
 <check type="logical" condition="not"><check type="uninstall"
condition="exists" path="Adobe Reader XI .+" /></check>
 <check type="uninstall" condition="versionsmallerthan" value="11.0.04"
path="Adobe Reader XI .+" />
 </check>
 </condition>
 <exit code="0" />
 <exit code="3010" reboot="false" />
 </command>
 <command type="install" cmd='msiexec /qn /update
"%SOFTWARE%Outils_BureautiqueadobereaderAdbeRdrUpd11006.msp"' >
 <condition>
 <check type="logical" condition="or">
 <check type="logical" condition="not"><check type="uninstall"
condition="exists" path="Adobe Reader XI .+" /></check>
 <check type="uninstall" condition="versionsmallerthan" value="11.0.06"
path="Adobe Reader XI .+" />
 </check>
 </condition>
 <exit code="0" />
 <exit code="3010" reboot="false" />
 </command>
 <command type="install" cmd='msiexec /qn /update
"%SOFTWARE%Outils_BureautiqueadobereaderAdbeRdrUpd11007.msp"' >
 <condition>
 <check type="logical" condition="or">
 <check type="logical" condition="not"><check type="uninstall"
condition="exists" path="Adobe Reader XI .+" /></check>
 <check type="uninstall" condition="versionsmallerthan" value="11.0.07"
path="Adobe Reader XI .+" />
 </check>
 </condition>
 <exit code="0" />
 <exit code="3010" reboot="false" />
 </command>
 <command type="install" cmd='msiexec /qn /update
"%SOFTWARE%Outils_BureautiqueadobereaderAdbeRdrUpd11009.msp"' >
 <condition>
 <check type="logical" condition="or">
 <check type="logical" condition="not"><check type="uninstall"
condition="exists" path="Adobe Reader XI .+" /></check>
 <check type="uninstall" condition="versionsmallerthan" value="11.0.09"
path="Adobe Reader XI .+" />
 </check>
 </condition>
 <exit code="0" />
 <exit code="3010" reboot="false" />
 </command>
 <command type="install" cmd='msiexec /qn /update
"%SOFTWARE%Outils_BureautiqueadobereaderAdbeRdrUpd11010_incr.msp"' >
 <condition>
 <check type="logical" condition="or">
 <check type="logical" condition="not"><check type="uninstall"
condition="exists" path="Adobe Reader XI .+" /></check>
 <check type="uninstall" condition="versionsmallerthan" value="11.0.10"
path="Adobe Reader XI .+" />
 </check>
 </condition>
 <exit code="0" />
 <exit code="3010" reboot="false" />
 </command>

 <command type="upgrade" include="install"/>
 <command type="downgrade" include="install"/>

 <command type="remove" cmd='cscript %CHECKPROC% AcroRd32.exe' />
 <command type="remove" cmd='msiexec /qn
/x{AC76BA86-7AD7-%LCID%-7B44-AB0000000001}' >
 <exit code="0" />
 </command>
 </commands>

</package>

The first command tests whether Reader is running. Then, the main
program is installed only if there's no Uninstall record of it. Then,
each patch is run only if either the software wasn't installed in the
first place, or the installed software's patch level is lower than the
patch to run.

To add a patch, you just copy/paste the last patch 'block', adapt the
filename and the version check value, then update the package's version
variable.

Of course for that to work with your particular software, it must use
the correct patch level in its Uninstall version field.

N.

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20150210/b31f8823/attachment-0003.html>


More information about the wpkg-users mailing list