[wpkg-users] Upgrades
Rainer Meier
r.meier at wpkg.org
Tue Apr 15 13:37:54 CEST 2008
Hi Daniel,
Daniel Dehennin wrote:
> As far as I understand, to upgrade a package I need to provide the
> <upgrade /> to the new revision of the package.
True.
> Most of the time, this upgrade uninstall the old package and install
> the new one.
NACK. Most of the packages are upgraded by simply executing the updated
installer. It will take care of the previous version automatically while
migrating the settings. Executing the uninstall procedure before causes
problems with some packages as the uninstaller also removes settings -
which would have to be re-done after re-install.
> What do you think about idempotent packages ? If no <upgrade/> is
> specified, just execute the <remove/> of the old revision and the
> <install/> of the new one.
I don't like this idea too much as I am quite sure it would lead to lots
of questions and possible problems. At the moment WPKG will simply not
execute anything if there is no upgrade path (upgrade commands)
specified. However it will still do the after-upgrade check and verify
if the package is installed.
There are also a number of use cases where you want to upgrade the
package without actually changing anything on the machines where the
software is already installed but allow new machines to install the
changed package. Currently you just leave the upgrade command empty,
leave the package checks (e.g. uninstall entry check) and then execute
it. On machines where the software is already installed nothing will be
done, the checks succeed and that's it. On new machines the install
commands are executed.
Implementing your change request would mean that even on the machine
which has already the correct software the uninstall and then the
install commands are executed. Which is a lot of overhead. Some people
will be pissed off because of this - I am sure about.
There is a reason that most packaging systems make a difference between
install and upgrade. We should not mix it up. Especially since it is
extremely easy to copy the install commands to the upgrade command in
case the application just needs the same command for both actions.
Finally I think introducing such a change could lead to lots of problems
and decreases the flexibility and clear syntax of WPKG (disallow empty
upgrade).
What do others think about it? Should an upgrade command be "smartly"
assumed and just execute some non-obvious commands or should we force
the admin to clearly specify what he wants to roll out?
br,
Rainer
More information about the wpkg-users
mailing list