[wpkg-users] Two questions on variables

Steve Kersley steve.kersley at keble.ox.ac.uk
Mon Nov 14 14:13:36 CET 2011


As part of a revamp of some of my wpkg scripts, I want to move towards a model where I can use one package definition to install different versions of the application in order to test and/or perform staged installations of a new version by overriding the package version with one defined in the host or profile (as per http://wpkg.org/Variables#Applying_different_versions)

Two hopefully simple questions came up that I've not found an answer to in the documentation:

* Is there a way of reusing the same variable, redefining it between applications?  i.e., if all scripts use PKG_VER.  For instance, something like:
    <profile id="custom">
        <variable name="PKG_VER" value="11.0.1" />
        <package package-id="flashplayer" />
        <variable name="PKG_VER" value="10.0.1.0" />
        <package package-id="acrobat" />
    </profile>

Or does it parse the whole thing first and I would be better off rewriting the scripts to all use different internal variables: FLASHPLAYER_VER; JAVA_VER etc?  (The latter will obviously require more work every time I import a script from the website)

* Is there any way of performing conditional actions/definitions dependant on the required package version - through extended host attribute matching for instance?  The reason for this might be that the install method may be different from one version to the next, but if you're wanting to test deployment first don't want to rewrite the whole script and break it for machines still needing the older version.  For instance, Acrobat Reader 1.0.1.1 needs a command line that installs 1.0.1.0 plus a patch to 1.0.1.1 rather than a single installer, so I can't just use a filename based on the final version number.

Ta,
Steve.



More information about the wpkg-users mailing list