Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.0
-
Component/s: Documentation, Installer
-
Labels:None
-
Testcase included:yes
Description
There might be used dynamic variables for gathering certain conditions to be evaluated in the installerrequirements at the very early phase of the installation. Example:
<info>
...
<installerrequirements>
<installerrequirement
condition="iscompatibleupgrade"
message="The current upgrade is not compatible with a previously installed version"/>
</installerrequirements>
</info>
<dynamicvariables>
<variable name="previous.version" checkonce="true"
file="${INSTALL_PATH}/installation.properties" type="options"
key="version"/>
</dynamicvariables>
<conditions>
<condition type="or" id="iscompatibleupgrade">
<condition type="variable">
<name>previous.version</name>
<value>1.0</value>
</condition>
<condition type="variable">
<name>previous.version</name>
<value>1.1</value>
</condition>
</condition>
<conditions>
This is not possible at the moment, because dynamic variables are still not refreshed in that installation phase.
I would add refresshing them already at the very early beginning of an installation to make cases as above possible.
Issue Links
- is superceded by
-
IZPACK-520
Implement basic upgrade handling
-
I'd still vote for this issue to be resolved, as dynamic variables are necessary for much simpler usecases, too:
As static variables cannot be nested (only built-in variables are substituted in the definition), one has to use dynamic variables, which are not parsed at the beginning of the installation, which leads to obscure errors (see below).
E.g., installation paths cannot be easily appended, as in:
Using dynamic variables does not help us here neither, because they are not parsed at the beginning of the installation, which causes the "src"-attribute to be un-substituted, but the "target"-attribute is actually substituted since it is only parsed when actually copying the files to the target directory:
<file src="${MY_SRC_PATH}/..." target="${MY_TARGET_PATH}">This is ambiguous behaviour and could be easily avoided if static variables where a bit more useful and/or dynamic variables would be parsed at beginning.
<file src="${MY_SRC_PATH}/..." target="${MY_TARGET_PATH}">