Hello there.

here is another patch from me :)

Until now, wpkg always used the client-installed packages.xml for
removal-cmd's. This patch does modify the remove-routines. If you remove the
"revision"-Attribute from a package inside the Server-packages.xml, wpkg
marks the package as "to be removed" and does handle it as if the
package-entry would have been removed completely.
As difference, wpkg tries to use the server-side removal-cmd's first and
does fall back, if thre aren't any.

DRAWBACK: The "revision"-Attribute becomes a REQUIRED ATTRIBUTE


My reasons why to change this:

1) possibility to modify the local file "wpkg.xml" is higher than to modify
a serverfile "packages.xml" (this IS a lesser security risk)
2) whenever you installed a program and made an error for the installscript,
you know the problem by yourself.
3) all changes are backward-compatible, so no harm is done. (exept for the
revision-Attribute)


So: attached to this mail is a patch against wpkg.js from "WPKG 0.9-test2"


short abstract of the functionality:

/S/ = package in packages.xml on the server (also assigned in profiles.xml)

/A/ = installed package on local computer and stored in wpkg.xml (local)

Case 1: (standard procedure)
 * /S/ is removed from profiles.xml or packages.xml
-> /A/ is removed following the cmd's from wpkg.xml (local)

Case 2: (added procedure)
 * attribute "revision" in /S/ removed (I know, this does affect ALL
profiles!)
-> /A/ is removed following the cmd's from packages.xml (server)




-------------------------------------------
Another theme:

while testing the patch above, I found a flaw in "dryrun"-Implementation:
Everything installed / pretended wonderful but the reboot()-Function had no
dryrun. (I found out the hard way :)
So the attached patch does fix this problem too.


Best regards.
Gordon Klimm

-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

Attachment: wpkg.js.0004.patch
Description: Binary data

Reply via email to