[wpkg-users] Remove problem, wpkg checks success before remove completes

Mike Moynihan moymike at yahoo.com
Wed Apr 8 16:19:18 CEST 2009


I am having a problem with the wpkg.js checking for the status of the remove, before the remove completes.  

It works like this.
1.  Add the package
2.  Run the wpkg process which installs the package
3.  Remove the package, expecting it the next run of wpkg to uninstall it
4.  Run the wpkg process, which uninstalls the package ***
5.  The "check" after the remove occurs BEFORE the uninstall completes, so the package remains in the wpkg.xml file
   <here begins the problem>
6.  Run the wpkg process
7.  The package will check for the install before the removal, which will fail
8.  wpkg installs the package
9.  wpkg removes the package
10.  The uninstall completes before the recheck is done, the package remains in wpkg.xml
11.  successive runs of wpkg.js repeats the install / uninstall

This is a simple package, it's the one used in the WPKG QUICK INSTALL guide.  The remove command runs as a separte process, returning control back to wpkg.js before it has completed.  This causes the issue, as wpkg.js checks the install status immediately after the uninstall command returns control.

Is there a command switch that will cause the uninstaller to not return control until it completes?  Is there a way for wpkg to handle this?

I execute wpkg.js in a batch file via windows job scheduler.  Here is the info regarding the job, including the debug info written to the log.

wpkg.bat:
set software=\\server\software
cscript \\server\wpkg\wpkg.js /synchronize /debug > c:\wpkg.log

Package for DIA:
  <package id='dia' name='Dia Diagram Editor' revision='1' reboot='false' priority='800'>
    <check type='file' condition='exists' path='%PROGRAMFILES%\dia\dia-0.96.1-9-uninstall.exe'/>
    <install cmd='"%SOFTWARE%\dia\dia-setup-0.96.1-9.exe" /S'/>
    <upgrade cmd='"%SOFTWARE%\dia\dia-setup-0.96.1-9.exe" /S'/>
    <remove cmd='"%PROGRAMFILES%\dia\dia-0.96.1-9-uninstall.exe" /S'/>
  </package>

wpkg.log on the Install:
Executing command : "%SOFTWARE%\dia\dia-setup-0.96.1-9.exe" /S
Command in installation of Dia Diagram Editor returned exit code [0]. Success.
Checking existence of package: Dia Diagram Editor
The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' exists: the test was successful
Removing currently existing settings node first: 'Dia Diagram Editor' (dia), Revision 1
Adding settings node: 'Dia Diagram Editor' (dia), Revision 1
Processing (install) of Dia Diagram Editor successful.
Restoring previous environment.

wpkg.log on the Remove:
Removing Dia Diagram Editor (dia)...
Found system locale: 409
No locale language definition found for message ID 'notifyUserStart' (language LCID '409').
Executing command: "%PROGRAMFILES%\dia\dia-0.96.1-9-uninstall.exe" /S
Command returned result: 0
Command in removal of Dia Diagram Editor returned exit code [0]. Success.
Checking existence of package: Dia Diagram Editor
The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' exists: the test was successful
Checking dia zombie state.
Could not process (remove) Dia Diagram Editor.
Package still installed.

wpkg.log for EVERY successive run:  (install then uninstall)
Going to install package 'Dia Diagram Editor' (dia), Revision 1, (execute flag is '', notify flag is 'true').
Package 'Dia Diagram Editor' (dia): Not yet processed during this session.
Checking existence of package: Dia Diagram Editor
The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' does not exist: the test failed
Package 'Dia Diagram Editor' (dia): Installed but checks failed. Re-Installing.
Found system locale: 409
No locale language definition found for message ID 'notifyUserStart' (language LCID '409').
Installing dependencies of 'Dia Diagram Editor' (dia).
Installing 'Dia Diagram Editor' (dia)...
Reading variables from package
Reading variables from package Dia Diagram Editor
Stored 0 variables from package
Reading variables from profile[s]
Getting profiles which apply to this node.
1 profiles apply to this host.
Reading variables from profile custom0
Reading variables from host banc60xpof03
Install type: install
Fetched 1 install command(s).
Executing command : "%SOFTWARE%\dia\dia-setup-0.96.1-9.exe" /S
Command in installation of Dia Diagram Editor returned exit code [0]. Success.
Checking existence of package: Dia Diagram Editor
The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' exists: the test was successful
Removing currently existing settings node first: 'Dia Diagram Editor' (dia), Revision 1
Adding settings node: 'Dia Diagram Editor' (dia), Revision 1
Processing (install) of Dia Diagram Editor successful.
Restoring previous environment.
Removing Dia Diagram Editor (dia)...
Executing command: "%PROGRAMFILES%\dia\dia-0.96.1-9-uninstall.exe" /S
Command returned result: 0
Command in removal of Dia Diagram Editor returned exit code [0]. Success.
Checking existence of package: Dia Diagram Editor
The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' exists: the test was successful
Checking dia zombie state.
Could not process (remove) Dia Diagram Editor.
Package still installed.



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20090408/7127a528/attachment-0001.html>


More information about the wpkg-users mailing list