[wpkg-users] No error reported if no upgrade command specified

Rainer Meier r.meier at wpkg.org
Thu Jun 18 11:40:48 CEST 2009


Hi Simon,

simplesi wrote:
> I was trying to find out why a package wasn't being upgraded and I eventually
> noticed I'd used <update cmd ...  instead of <upgrade cmd ...  :)
> 
> Would it be possible for WPKG to output a warning to indicate that although
> an update has been instructed (by incrementing the version number) - no
> "upgrade" command was found.

Actually this is on purpose. Zero (0) commands is completely valid for WPKG -
this is true for install, upgrade, downgrade and remove commands. In fact I (and
for sure others as well) use this "feature" to upgrade package definitions
without actually deploying software. If you keep the upgrade command empty and
just update some remove commands or checks, then this allows you to update these
parts of the package without WPKG actually deploying something. Using the logs
you can always prove if WPKG really executed the commands you expected or not.

One more hint: The typo (or wrong attribute names...) can be prevented by using
a decent XML editor and the XSD files available since WPKG 1.1. If you would use
<update /> then you would get an immediate validation error by your editor.


br,
Rainer



More information about the wpkg-users mailing list