[wpkg-users] [BUG?] On upgrade old check condition are parsed...
Rainer Meier
r.meier at wpkg.org
Thu Nov 25 19:10:36 CET 2010
Hi Marco,
On 25.11.2010 18:44, Marco Gaiarin wrote:
> Mandi! Rainer Meier
> Can i add a proposal to change this behaviour?
I don't think that this can be done in the current logic. It will break updates
and therefore the most important functionality of WPKG.
> Crearly every problem have a solution or a workaround, but, at least
> for me, the check condition grant that a package are installed (or not)
> and so have to be evaluated on every actions (ok, probably not on
> remove) ...
>
> Ok, it is true that on every execution check condition are evaluated,
> but there's corner cases, like these on VLC, that you hit after
> upgrade the revision.
I think in your case there are far easier ways to achieve a proper upgrade if
uninstall.exe is missing. A simple script can check if the VLC installation
directory still exists but VLC is still installed and then perform necessary
actions during upgrade.
> Also, checking condition on upgrade seems to me that does not disrupt
> nothing in the WPKG logic...
Sure it would. For most users upgrades would be completely skipped all the time
if WPKG would first use the checks before installation and if they succeed skip
the update. Most packages simply use a check on uninstall entries which
typically do not include any version and therefore it's true for both, the old
and the new version. So WPKG entirely detects whether to run an upgrade on the
revision change of the package.
So it seems that you put your WPKG into a state where it appears to do something
else than you happen to expect. Blindly starting to change essential algorithms
in WPKG will for sure break several installations. On the other hand I've
already presented a very simple way (actually already two) to get out of this state.
Unfortunately VLC is a very special case. It needs uninstalling before
re-installing. So some users appear to handle upgrades differently than the
initial installation. Myself I am using my generic CMD script which executes the
uninstall before the re-install if VLC is already installed. In your case it
might be easy to add another check that if the uninstaller is missing it cleans
the install folder (and potentially the uninstall registry entry) before
re-installing.
So I strongly recommend you to apply a simple fix to your package which deals
with this special case. And it does not matter whether you add this fix to
upgrade commands only or to upgrade and install commands.
br,
Rainer
More information about the wpkg-users
mailing list