Page 1 of 1

[SOLVED] PuTTY packages and overly broad uninstallation

Published: April 30, 2025 - 12:01
by STbar
Good morning,

The PuTTY package uses the following code during installation to uninstall older versions:

Code: Select all

    for to_uninstall in installed_softwares(name="PuTTY "):
        if Version(to_uninstall["version"]) < Version(control.get_software_version()) or force:
However, other products have the name PuTTY in their names.
This implies the unwanted uninstallation of other software.

I suggest you use the following code which checks the editor to avoid any problems:

Code: Select all

    for to_uninstall in installed_softwares(name="PuTTY "):
        if to_uninstall["publisher"]=="Simon Tatham" and (Version(to_uninstall["version"]) < Version(control.get_software_version()) or force):

Good day

Re: PuTTY packages and overly broad uninstallation

Published: April 30, 2025 - 2:15 PM
by jlepiquet
Hello,

Thank you for the feedback.
Indeed, that could have been a problem. We've added the publisher to the if statement as you recommended.
We've also modified the search name so that it starts with "PuTTY" and doesn't just contain it.

This should reduce the number of unexpected uninstallations.

The package is available here in pre-production: https://wapt.tranquil.it/wapt-testing/t ... EPROD.wapt

Have a good day

. Best regards,