[wpkg-users] Orphaned packages (patches,

Mike Moynihan moymike at yahoo.com
Mon May 4 19:11:07 CEST 2009


I understand that these orphaned packages would be removed from the client, if I remove them entirely from the host.  But, this only works if I am actually removing the software package entirely from wpkg control.

In my case, I am wishing to remove say... Microsoft Office from all machines within a group.  I currently have an SP3 package and a few tweak packages.  I have them as separate packages to ensure that they "check" and install as needed.  Neither of them have a separate uninstaller, and when the primary package, Microsoft Office, is removed, all that was installed by the add on packages get removed also.  This leaves the add on package orphaned.

I do not want to remove the Microsoft Office package from my main package list, as I have many other hosts that contain it in their profiles.  I can not run "remove" for these orphaned packages, and it would not work anyways, since each "check" portions fails.

Every time I run WPKG.js on these machines, these "check"s are performed, and these packages are left orphaned in the client wpkg.xml.

I have thought about doing a revision of these, but since they are in use by other clients to wpkg, I have to keep the "check" and the installer the same.  Putting in a dummy remove doesn't help, since the check fails for the orphans.

I could edit the wpkg.xml on each client, but I would hope there is a better way to clear these.  Am I missing a way to clear these orphaned packages that already works?

I have some ideas for wpkg.js mods, but wanted to see if there was a current way to handle this issue before I go there.

<img alt="Image hosted by Photobucket.com" src="http://i33.photobucket.com/albums/d84/moymike/cb01a160gif.gif">




________________________________
From: Rainer Meier <r.meier at wpkg.org>
To: Mike Moynihan <moymike at yahoo.com>
Cc: wpkg-users at lists.wpkg.org
Sent: Monday, May 4, 2009 11:13:07 AM
Subject: Re: [wpkg-users] Orphaned packages (patches, settings and service packs)

Hi Mike,

Mike Moynihan wrote:
> I have several packages that look like this:
>  
> <package id="abc" name="abc" priority="105">
>    <check ..../>
>    <install cmd .... />
>    <remove cmd..../>
> </package>
> <package id="abc-sp1" name="abc-sp1" priority="104">
>    <check ..../>
>    <install cmd .... />
> </package>
> <package id="abc-sp2" name="abc-sp2" priority="103">
>    <check ..../>
>    <install cmd .... />
> </package>
>  
> My question is when I remove package "abc" from a system that has both
> sp1 and sp2 installed, the packages for sp1 and sp2 remain in the client
> wpkg.xml file.  The problem is that the removal is based on package "abc".
>  
> Once I remove "abc" and it's sp's from the profile, and the wpkg.xml
> from the client is stripped of the primary package "abc", I find that
> every time wpkg.js runs, it checks both sp1 and sp2 packages and reports
> that it can not remove them.
>  
> How do I get wpkg.js to remove these orphaned packages?

There are sevaral ways to achieve this. First of all it seems that you failed to
specify some dependencies between these packages ("abc-sp1" and "abc-sp2" depend
on "abc", maybe "abc-sp2" depends only on "abc-sp1" to create a chain... who
knows...). If you would have done so, then uninstalling "abc" would also remove
packages which depend on it (e.g. "abc-sp1" and "abc-sp2").

Now you end up with en uninstalled "abc" package while the "abc-sp1" and
"abc-sp2" packages still exist and WPKG of course tries to remove them while the
remove command of these packages might fail.

As long as "abc-sp1" and/or "abc-sp2" are stil part of the package database on
server side (packages.xml) WPKG will re-try to uninstall them properly on each
run. So you still have the chance to fix your "abc-sp1"/"abc-sp2" package
definitions to correctly uninstall even if "abc" has been removed already. To do
so you might just fix the package definition and increase the revision number.
So WPKG will first do an upgrade (using eventually defined upgrade commands) and
then uninstall it - using the new uninstall commands.

In case we are really talking about a service pack package or similar removing
them might not be required any more. In this case just remove
"abc-sp1"/"abc-sp2" completely from your packages.xml on server side. WPKG will
then try to remove it on client side and even if it fails to do so it will
remove the package from the local package database. This prevents you from
ending up in an endless remove-loop on each reboot.
So as long as you would like to keep a chance to fix your "abc-sp1"/"abc-sp2"
package you keep it within packages.xml and you might fix it as many times as
you like. As soon as you remove it completely WPKG will try once again to remove
it and then remove it anyway from the local wpkg.xml, thus not re-trying to
remove it on next reboot.

br,
Rainer


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


More information about the wpkg-users mailing list