Winget-AutoUpdate icon indicating copy to clipboard operation
Winget-AutoUpdate copied to clipboard

Duplicate items should be removed before installing

Open sukiletxe opened this issue 2 years ago • 10 comments

Sometimes, Winget or the system (leaning towards winget tbh) leaves two versions of a program. This results in WAU trying to update an app two or three times, as the list of apps is checked just once. This is not the same thing Winget does:

  • winget upgrade lists all apps, no matter if there are duplicates.
  • winget upgrade --all updates all apps, by adding them to a list first, where they are added just once.

I propose doing the second thing, to prevent multiple downloads of the same program. To do this, one solution would be checking if the ID of a specific software exists in the list before adding it.

sukiletxe avatar Jul 01 '22 12:07 sukiletxe

If we run winget upgrade --all it will basically run all upgrades, right ? This is something we want to control with WAU. Adding a check on duplicates should be considered

Romanitho avatar Jul 01 '22 17:07 Romanitho

Sorry, I explained myself really badly. Yes, exactly, what I meant was that WAU should behave like winget upgrade --all regarding duplicates, not to run it directly.

sukiletxe avatar Jul 01 '22 17:07 sukiletxe

I see 🙂 I thought winget was taking care about duplicates on latest versions. I'll chekc that when I have time.

Romanitho avatar Jul 01 '22 18:07 Romanitho

Maybe. I have v1.2.11601 (which I cannot find tagged as a release in their github). App installer was updated on 26th June (and winget comes with it).

sukiletxe avatar Jul 01 '22 19:07 sukiletxe

we use the current preview one, waiting for official release coming soon. From then, we will recommend only stable version. But the features was interesting, so we selected the pre release version https://github.com/microsoft/winget-cli/releases/tag/v1.3.1741

Romanitho avatar Jul 01 '22 20:07 Romanitho

OK, I'll wait until there is a stable version, then see if this behaviour manifests. If not I'll close it. Thanks!

sukiletxe avatar Jul 01 '22 20:07 sukiletxe

Stable release is out. You should not have any issue anymore

Romanitho avatar Jul 08 '22 05:07 Romanitho

I have v1.3.2091 now and there are still duplicates. This is my output when running winget upgrade:

Nombre                     Id                            Versión              Disponible           Origen
---------------------------------------------------------------------------------------------------------
Spotify                    Spotify.Spotify               1.1.88.612.gcc529952 1.1.91.824.g07f1e963 winget
WinSCP 5.21                WinSCP.WinSCP                 5.21                 5.21.1               winget
Python 3.9.6 (64-bit)      Python.Python.3               < 3.10.0             3.10.5               winget
Python 3.10.4 (64-bit)     Python.Python.3               3.10.4               3.10.5               winget
Java 8 Update 333 (64-bit) Oracle.JavaRuntimeEnvironment 8.0.3330.2           8.0.3410.10          winget
Google Chrome              Google.Chrome                 103.0.5060.134       104.0.5112.81        winget
Python 3.9.6 (32-bit)      Python.Python.3               < 3.10.0             3.10.5               winget
7 actualizaciones disponibles.

(In this case, the duplicated Python is excluded so it doesn't worry me that much)

sukiletxe avatar Aug 05 '22 07:08 sukiletxe

this is not because you have different versions installed ?

Romanitho avatar Aug 08 '22 08:08 Romanitho

I think it is, I have several versions of Python installed.

sukiletxe avatar Aug 08 '22 13:08 sukiletxe

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Sep 08 '22 03:09 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Sep 22 '22 03:09 github-actions[bot]