[wpkg-users] issue with 1.2.1-RC25?
Rainer Meier
r.meier at wpkg.org
Thu Oct 20 23:41:30 CEST 2011
Hi both,
On 20.10.2011 21:12, Stefan Pendl wrote:
> OK, so I think I know what the problem is.
I think you're right ;)
The fix took a bit more changes than I initially thought but I've introduced
some improvements as well. Especially the debug log will now also print the
variables in order they are resolved. So it's easier to see when a variable
expansion will not work because the variable to be exapnded is not yet set.
I did some quick testing with similar structure as Brent has described it:
- Basic profile included by host profile sets SOFTWARE
- Package sets PKG_SOURCE which depends on SOFTWARE
- Package sets PKG_SOURCE2 which depends on PKG_SOURCE
The result in 1.2.1-RC27 is as follows:
DEBUG : Setting variable: 'SOFTWARE=\\server\share\software'.
DEBUG : Setting variable: 'PKG_SOURCE=%SOFTWARE%\software.free'.
DEBUG : Setting variable: 'PKG_SOURCE2=%PKG_SOURCE%\test'.
> The order of variable evaluation is as follows:
>
> 1) package variables
> 2) profile variables
> 3) host variables
Now this is clearly defined:
- WPKG reads all host variables applying to the current host
- WPKG reads all profile variables applying to the current host
- WPKG reads all package variables
Please verify with WPKG 1.2.1-RC27 from SVN:
<http://wpkg.svn.sourceforge.net/viewvc/wpkg/wpkg/stable/1.2/>
Changes:
MOD: Changed variable expansion order. Now the order is clearly defined as
follows:
- Host variables
- Profile variables (in reverse order, dependencies first)
- Package variables
This way package variables can refer to profile variables.
Profile variables in turn can refer to host variables.
Variables can always also include the value of variables already defined
using the %VARIABLE% syntax in the value attribute of the variable
definition. So for example a package variable can refer to a profile
variable. A package variable can also refer to a variable defined within
the same package as long as the variable it refers to appears before the
one referring to it.
Thanks to Brent A Nelson for pointing us to the issue.
Thanks to Stefan Pendl for analyzing the issue.
MOD: Improved variable reading using caches for host and profile variables.
I did run a full wpkg-test suite without problems.
br,
Rainer
More information about the wpkg-users
mailing list