[wpkg-users] [Bug 77] New: Zombie package handling

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Wed Oct 24 00:14:38 CEST 2007


http://bugzilla.wpkg.org/show_bug.cgi?id=77

           Summary: Zombie package handling
           Product: WPKG
           Version: other
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: wpkg.js
        AssignedTo: mangoo at wpkg.org
        ReportedBy: skybeam at users.sourceforge.net
         QAContact: wpkg-users at lists.wpkg.org


Created an attachment (id=40)
 --> (http://bugzilla.wpkg.org/attachment.cgi?id=40)
WPKG which removes zombie packages even if uninstall string fails.

Hi,

I am using WPKG as a background service. Several times I run into the problem
that my configured uninstall strings do not work properly and therefore not
completely uninstall the application. In such case the application is not
removed and the entry remains within the local wpkg.xml file.
Unfortunately at each boot it tries to uninstall the same package again and
again. Even worse; when the package is completely removed from the packages.xml
(I am using wpkg_web) it still remains in the local database and continues to
raise errors since the uninstall procedure fails each time. The only way to
overcome this problem is to create a new version of the package with fixed
uninstall procedure which will upgrade the existing one. However this has some
drawbacks that I need to create a "dummy" package to fix the local database and
wait for all users to apply this dummy package before I can remove it from the
profile in order to get it removed. This is very ugly since it might be
difficult to get wpkg.xml from the clients to "restore" an already deleted
package just to fix a client side "endless uninstall loop".

Therefore I decided to slightly change the script algorithm in order to remove
zombie packages from wpkg.xml even if uninstallation fails. This leaves you
both options. Either just removing the package from the profile to uninstall it
or completely remove it from the package database. Please note that also
removing the package from the database tries a clean uninstall but in case the
uninstall string fails it is simply removed from wpkg.xml (local).

In addition I did some small code refacturing:
- Introduced a warning() method to create warning-level messages (used to
notify users about zombie removal in case uninstall fails)
- consequently use get* methods to get settings and package "package" nodes
- Converted tabs to spaces (wpkg.js was using tabs/spaces for indentation)
- Fixed some code formattings for better readability
- Added /noforcedremove switch to disable forced zombie remove (in case
somebody does not like it)


I would be glad if somebody could review my changes. I did some quick checks of
my new functionality using the following parameters within wpkg GUI:

/synchronize /nonotify /quiet /base:http://user:pass@server/wpkg_web

Everything seemed to work fine. What I did not test are the various query*
methods (which I am not using) and other manual operations. I just use
/synchronize usually from WPKG GUI.

Note: This is my first JScript trial. I know Java very well but I hope I did
not introduce any critical problems.

All my changes are based on wpkg.js version 0.9.12-test2.

br,
SkyBeam


-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list