Changes

Variables

1,363 bytes added, 19:04, 20 January 2012
no edit summary
=== In which order are they applied ===
==== WPKG 1.2.x and below ====
The level below another will overwrite the previous definition.
<variable name="PKG_VER" value="1.2.0"/>
</package>
</source>
 
==== WPKG 1.3.x and above ====
The level below another will overwrite the previous definition.
 
# operating system
# WPKG client
# host
# profile
# package
 
For example, if a variable is defined at the package and the profile level, the definition of the package will be used.
<source lang="xml">
<profile id="TestPC">
<variable name="PKG_VER" value="1.2.3"/>
 
<package package-id="WpkgSettings"/>
</profile>
</source>
 
<source lang="xml">
<package
id="WpkgSettings"
name="WPKG Client Settings"
revision="%PKG_VER%"
priority="999"
reboot="false"
execute="once">
 
<variable name="PKG_VER" value="1.2.0"/>
</package>
</source>
 
To get the behavior of WPKG 1.2.x with WPKG 1.3.x, you need to check if the variable is set and only apply the current change if the variable is not set.
 
<source lang="xml">
<profile id="TestPC">
<variable name="PKG_VER" value="1.2.3"/>
 
<package package-id="WpkgSettings"/>
</profile>
</source>
 
<source lang="xml">
<package
id="WpkgSettings"
name="WPKG Client Settings"
revision="%PKG_VER%"
priority="999"
reboot="false"
execute="once">
 
<variable name="PKG_VER" value="1.2.0">
<condition>
<check type="host" condition="environment" value="PKG_VER=^$"
</condition>
</variable>
</package>
</source>
0
edits