[wpkg-users] [Bug 262] Wrong variable apply order

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Mon Jan 16 12:33:34 CET 2012


http://bugzilla.wpkg.org/show_bug.cgi?id=262

--- Comment #14 from Steve <steve.kersley at keble.ox.ac.uk>  ---
(In reply to comment #13)
> I think
> 
> <check type="host" condition="environment" value="MY_VAR=^$" />
> 
> should be correct; but as I am on the road right now I cannot test it.

This appears to work in that, with my package, it now does install the version
number defined in the host/profile in preference to the one defined in the
package.

However: it now seems to always run the install actions, regardless of whether
the version in the package is installed.  This may be an issue with my package,
but it didn't do this before changing the version variable definition to
include the condition.

In the package definition (for the Java runtime, pretty much copied from one of
the examples in the wiki with minor modifications), I have:

<variable name="JAVA_VERSION" value="29">
  <condition>
    <check type="host" condition="environment" value="JAVA_VERSION=^$" />
  </condition>
</variable>

I also set 'revision' in the package header to "%JAVA_VERSION%".  It looks as
though with the condition present in the package definition, this variable is
not getting expanded, but without the condition, it is.

>From the debug logs of a machine that is not overloading the variable, with the
condition tag:
Got variable 'JAVA_VERSION' of value '29'
Setting variable: 'JAVA_VERSION=29'.
Comparing version: '%JAVA_VERSION%' <=> '29'.
Comparing version fragments: 'JAVA' <=> '29'
Package 'Java Runtime Environment 6' (JRE6): Already installed but version
mismatch.
Installed revision: '29'
Available revision: '%JAVA_VERSION%'.
Preparing upgrade.

Whereas, on the same machine after just deleting the 'condition' tag from the
package:
Got variable 'JAVA_VERSION' of value '29'
Setting variable: 'JAVA_VERSION=29'.
Comparing version: '29' <=> '29'.
Checking existence of package: Java Runtime Environment 6

Is this another issue, or is there something else that needs to be done to
change the revision definition so that it expands correctly in addition to
adding the condition in order to get variable overloading within host/profile
definitions working as it did previously?

-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the wpkg-users mailing list