[wpkg-users] reinstall uses wrong package definition

Mark Nienberg gmane at tippingmar.com
Tue Mar 17 18:31:57 CET 2009


Rainer Meier wrote:
> 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).

It is.  The new file version is 10.0.0.something so the new check is true.  The new 
uninstall string is "Autodesk Design Review 2010", so the old check for uninstall 
string is false.

> 
>> 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.

The check (specified on the server) is for versiongreaterthan, which is satisfied. 
But wpkg still tries to reinstall because the old check for the uninstall string 
(specified in the local xml file) is no longer satisfied.  So I think it WAS 
necessary to manually erase the local package definition to avoid reinstall attempts 
at every boot.

-- 
Mark Nienberg
Sent from an invalid address. Please reply to the group.




More information about the wpkg-users mailing list