[wpkg-users] Issue in conditional check

Rainer Meier r.meier at wpkg.org
Thu Feb 16 15:04:21 CET 2012


Hi Malte,

On 16.02.2012 11:36, Malte Hohmann wrote:
> Hi all,
>
> I have come across an issue with the conditional execution of a command:
>
> I have the following package where the installation works, but removal does not due to environment variables not expanded in the conditional check:
>
...
> 		<command type="remove" cmd="%COMSPEC% /c del /s /q"%INST_PATH%\%INST_FILE%"">
> 			<condition>
> 				<check type="file" path="%INST_PATH%\%INST_FILE%" condition="exists" />
> 			</condition>
> 		</command>
...

>
> Looking into the wpkg logfile, the message "The path '%INST_PATH%\%INST_FILE%' does not exist: the test failed." appears.

I think you're right. The reason seems to be that during removal WPKG was not 
setting the package environment before evaluating the conditions. Therefore 
remove conditions did not expand package variables.

I've applied a change which is supposed to fix this:


FIX: Fixed issue that remove command conditions did not correctly expand
      package variables.
      Thanks to Malte Hohmann for reporting.

I did just test the fix very briefly. Actually I just tested whether WPKG still 
works for me but I did not configure this specific use case to test.

Could you run a test to verify whether it works for you now?

Get WPKG 1.3.1-RC5 here:
<http://wpkg.svn.sourceforge.net/viewvc/wpkg/wpkg/stable/src/main/resources/wpkg/>


Best regards and thank you for reporting!
Rainer



More information about the wpkg-users mailing list