[wpkg-users] Nested packages and variables
Steve Kersley
steve.kersley at keble.ox.ac.uk
Tue Sep 11 12:37:12 CEST 2012
I never got my previous attempt with nested packages working reliably (where a package depends on a stub package that in turn depends on other packages depending on architecture) without sometimes it wanting to keep installing and immediately uninstalling the same packages... My workaround was to just include the stub package in the computer profile directly rather than as a dependency from a package that needed it, and all seems well.
Anyway, now a new question with nested packages which probably isn't possible:
Again, I have created a stub package for Java, which then includes sub-packages for both the x86 and x64 java versions that only install the single architecture, simplifying checks and install/uninstall options.
Is it possible to set a variable in the parent 'stub' package that can then be accessed in the child packages?
My testing suggests not. Setting JAVA_VERSION in the parent package isn't accessible from the child packages - unless I'm doing something wrong?
Not a huge problem, only trying to simplify my packages by just having one version number to change in a consistent place to reduce the chance of one architecture being updated and the second missed (yes, I could set it in the profile but then that isn't consistent with my other packages).
Package definition is nothing special:
<package id="java6" name="Java Runtime 6" revision="1" reboot="false" priority="70">
<variable name="JAVA_VERSION" value="35">
<include package-id="java6-x86" />
<include package-id="java6-x64" architecture="x64" />
</package>
<package
id="java6-x86"
name="Java Runtime 6 (x86)"
revision="%JAVA_VERSION%"
reboot="false"
priority="60">
<check type="uninstall" condition="exists" path="Java(TM) 6 Update %JAVA_VERSION%" />
....
Steve.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20120911/cf828ad0/attachment-0001.html>
More information about the wpkg-users
mailing list