<div dir="ltr"><div>Dear wpkg community,</div><div><br></div><div>This is my first post here, so please apologize for any stupidities.</div><div>I
was trying to define variables in profiles, but they were not expanded
when the packages were processed (when looking in the windows event
logs), which should work since wpkg 1.3.x (<a href="https://wpkg.org/Variables#WPKG_1.3.x_and_above" target="_blank">https://wpkg.org/Variables#WPKG_1.3.x_and_above</a>) right?</div><div><br></div><div>I had a look at wpkg.js (var WPKG_VERSION = "1.3.1";) and found the following code in the function loadPackageEnv</div><div><br><div style="margin-left:40px"> <span style="font-family:monospace">// Load package variables and define them in the environemnt.<br> // This allows them to be used within profile and host definition.<br> var packageVariables = getPackageVariables(packageNode, null);<br> setEnvironmentList(packageVariables);<br><br> // Now load the profile environment which can use package variables and is<br> // allowed to override package variables.<br> var profileVariables = getProfileVariables(null);<br> setEnvironmentList(profileVariables);<br><br> // Now load the host environment which can use package and profile<br> // variables and is allowed to override those.<br> var hostsVariables = getHostsVariables(null);<br> setEnvironmentList(hostsVariables);</span></div></div><div><br></div><div>to me this looked like pre-1.3.x behaviour and I changed the order from package-profile-host to host-profile-package</div><div><br><div style="margin-left:40px"> <span style="font-family:monospace">// First load the host environment which can NOT use package and profile<br> // variables and is NOT allowed to override those.<br> var hostsVariables = getHostsVariables(null);<br> setEnvironmentList(hostsVariables);<br> <br> // Then load the profile environment which can NOT use package variables and is<br> // NOT allowed to override package variables.<br> var profileVariables = getProfileVariables(null);<br> setEnvironmentList(profileVariables);<br> <br> // Last load package variables and define them in the environemnt.<br> // This allows them to use profile and host variables.<br> var packageVariables = getPackageVariables(packageNode, null);<br> setEnvironmentList(packageVariables);</span></div></div><div><br></div><div>for me this seemed to have fixed my issues.</div><div><br></div><div>Now I'm just wondering if I'm too stupid to understand how the guts of wpkg are supposed to work or if I'm up to something.</div><div><br></div><div>Best regards</div><font color="#888888"><div><br></div><div>Bernhard Mayr</div></font></div>