[wpkg-users] reinstall uses wrong package definition

Rainer Meier r.meier at wpkg.org
Tue Mar 17 00:40:21 CET 2009


Hi Mark,

Mark Nienberg wrote:
> On one workstation I had a situation where a user manually upgraded a program (I have 
> one user with admin privileges).  After his upgrade, the check condition no longer 
> worked. His workstation attempted to reinstall the old package at every boot.
> 
> In the old package definition I had:
> <check type="uninstall" condition="exists" path="Autodesk Design Review 2009" />
> 
> So I modified the package definition to this:
> <check type="file" condition="versiongreaterthan" 
> path="%PROGRAMFILES%\Autodesk\Autodesk Design Review\DesignReview.exe" value="9.0.0.0"/>

Well, make sure the file version is 9.0.0.0 or higher (and not the
product version value in the binary).


> I expected that wpkg would now accept his upgraded installation and stop trying to 
> reinstall the package.
> 
> But here is the surprise output (abbreviated) from a debug run:
> 
> WPKG 1.0.2 starting...
> Found installed package 'Autodesk Design Review 2009' (DesignReview2009).
> Package 'Autodesk Design Review 2009' (DesignReview2009) found in profile packages.
> 
> Going to install package 'Autodesk Design Review 2009' (DesignReview2009), Revision 
> 0, (execute flag is '', notify flag is 'true').
> 
> Package 'Autodesk Design Review 2009' (DesignReview2009): Not yet processed during 
> this session.
> 
> Checking existence of package: Autodesk Design Review 2009
> Uninstall entry for Autodesk Design Review 2009 missing: test failed  <<<<<< Note!!

WPKG still looks for the uninstall entry.


> Package 'Autodesk Design Review 2009' (DesignReview2009): Installed but checks 
> failed. Re-Installing.
> 
> 
> As you can see, wpkg used the old check condition from it's local wpkg.xml file 
> instead of the new check condition form the server.

This is correct behavior. The package needs to be verified using the
same package definition WPKG used during installation of the package.
This makes sure the verification even works if the package definition is
removed from the server.


> I manually removed the old entry from the local xml file and then it accepted and 
> skipped the install.

This is not needed. It looks like you forgot to increase the package
revision attribute. If you would have done so WPKG would try to do an
upgrade and if it succeeds (your upgrade command might be empty or you
might have to accept an exit code for failed upgrade due to newer
version installed with the <exit> node) it will be added to local wpkg.xml.


br,
Rainer



More information about the wpkg-users mailing list