4 May 2009 04:14

### [Bug 145] Dependancy error when removing packages

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

--- Comment #9 from Kalmi <kalmisoft <at> gmail.com>  2009-05-04 04:14:22 ---
Created an attachment (id=143)
--> (http://bugzilla.wpkg.org/attachment.cgi?id=143)
complete(but minimalistic) test environment where you can easily reproduce the
bug by just running a bat file

--

--
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 archives >> http://lists.wpkg.org/pipermail/wpkg-users/

4 May 2009 04:16

### [Bug 145] Dependancy error when removing packages

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

Kalmi <kalmisoft <at> gmail.com> changed:

What    |Removed                     |Added
----------------------------------------------------------------------------
CC|                            |kalmisoft <at> gmail.com

--- Comment #10 from Kalmi <kalmisoft <at> gmail.com>  2009-05-04 04:15:45 ---
I'm still expriencing this error.
I uploaded a complete(but minimalistic) test environment where you can easily
reproduce the bug by just running a bat file.
The zip file contains the following:
wpkg.js(1.1.0-M27),
packages.xml(contains two packages, one depending on the other)
hosts.xml(neccesary)
profiles.xml(contains two profiles; one empty and one with the package that
depends on the other)
triggerError.bat (synchronize to profile "with_our_package", then synchronize
to profile "empty")
config.xml (probably not needed...)

Best regards,
Kalmi

--

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

(Continue reading)

4 May 2009 10:03

### Re: [Bug 145] Dependancy error when removing packages

Hello Kalmi,

> I'm still expriencing this error.
> I uploaded a complete(but minimalistic) test environment where you can
easily
> reproduce the bug by just running a bat file.
thanx for your file.

Some time ago I've written a regression suite for wpkg,
I've sent it to Rainer last week together with actual tests for recent bugs.

Just didn't find the time to write a documentation in the Wiki and to put
it in CVS.

I can tell, that the test suite runs without any error for wpkg version
1.0.2 and 1.0.4, but not for 1.1.0-Mxx up to M27.

I've integrated your files into the test suite. If you do such tests, make
sure, that you don't use the standard wpkg.xml file on your computer - you
should use parameter "settings_file_path" in config.xml to use an other
place to store wpkg.xml.

Your test works to show the "Null" error, but does not show the dependency
error. For this, you must have at least two packages A and B which depend
from the same package C, which are going to be removed. In this case, you
need 2 runs of wpkg.js to remove all packages, 3 if you have 3 dependent
packages and so on.

Best regards,
Falko

(Continue reading)

4 May 2009 11:45

### WPKG and rebootcmd

Hi,

I have problem running rebootcmd script within config.xml. I have
changed rebootcmd to:

<param name='rebootCmd' value='tools\reboot.bat' />

and in event log on win machine I have this error:

> Could not process (install) package 'IE8 CZ 32bit pro Windows XP' (ie8cz-xp):
> Could not locate rebootCmd '\\faramir\netlogon\wpkg-testing\tools
> eboot.bat'..

Why is wpkg interpreting "\r" in vaule of rebootcmd?

--

--
Vladimir Psenicka
IT system engineer
Prodeco a.s.
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/

4 May 2009 11:56

### Re: WPKG and rebootcmd

Vladimir Psenicka schrieb:
> Hi,
>
> I have problem running rebootcmd script within config.xml. I have
> changed rebootcmd to:
>
> <param name='rebootCmd' value='tools\reboot.bat' />

Change this to:

tools\\reboot.bat

> and in event log on win machine I have this error:
>
>> Could not process (install) package 'IE8 CZ 32bit pro Windows XP' (ie8cz-xp):
>> Could not locate rebootCmd '\\faramir\netlogon\wpkg-testing\tools
>> eboot.bat'..
>
> Why is wpkg interpreting "\r" in vaule of rebootcmd?

The config file is XML, so \ is used as an "escape character".

&#92; should work as well I think.

Something like that too, although I didn't check it:

<![CDATA[
\a path\to\a\file
]]>


(Continue reading)

4 May 2009 12:40

### Re: WPKG and rebootcmd

Tomasz Chmielewski wrote:
Vladimir Psenicka schrieb:
> Hi,
>
> I have problem running rebootcmd script within config.xml. I have
> changed rebootcmd to:
>
> <param name='rebootCmd' value='tools\reboot.bat' />

Change this to:

tools\\reboot.bat

> and in event log on win machine I have this error:
>
>> Could not process (install) package 'IE8 CZ 32bit pro Windows XP' (ie8cz-xp):
>> Could not locate rebootCmd '\\faramir\netlogon\wpkg-testing\tools<file://faramir/netlogon/wpkg-testing/tools>
>> eboot.bat'..
>
> Why is wpkg interpreting "\r" in vaule of rebootcmd?

The config file is XML, so \ is used as an "escape character".

&#92; should work as well I think.

Something like that too, although I didn't check it:

<![CDATA[
\a path\to\a\file
]]>

(Continue reading)

4 May 2009 16:23

### Orphaned packages (patches, settings and service packs)

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?

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

-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users <at> lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users

4 May 2009 18:04

### Re: WPKG and rebootcmd

On 5/4/09, Vladimir Psenicka <vladimir.psenicka <at> prodeco.cz> wrote:

Why is wpkg interpreting "\r" in vaule of rebootcmd?

\r is the escape character for carriage return, which is why the "eboot.bat" part is on the next line. As previously noted, you have to escape the backslash so that "\r" is not interpreted:

<param name='rebootCmd' value='tools\\reboot.bat' />
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users <at> lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users

4 May 2009 18:13

### Re: 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
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/

4 May 2009 19:11

### Orphaned packages (patches,

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.

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

-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users <at> lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Gmane