Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade --all installs packages that are already up to date #1075

Closed
jpbnetley opened this issue Jun 2, 2021 · 16 comments
Closed

upgrade --all installs packages that are already up to date #1075

jpbnetley opened this issue Jun 2, 2021 · 16 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@jpbnetley
Copy link

Brief description of your issue

When I run the winget upgrade --all winget tries to upgrade software that are already the latest.
In this example, it tried to update 2 software.

  • AIMP
  • Discord.

I should mention that I had these apps installed form their respected websites before I had winget installed.

Steps to reproduce

I opened the term application as admin, and executed winget upgrade --all
In the attached screenshot, you will see I have discord, and AIMP open with their versions before I ran the update.
winget upgrade

Discord's installed version is 1.0.9002
AIMP's installed version is 4.70.2251

Initially I thought it might be related to this issue: #696 (comment)
But when I checked the versions for both apps, I saw that winget lists the same versions that was installed.
To see the discord version, I ran: winget search discord
To see the AIMP version, I ran: winget search aimp

Expected behavior

I expected that when the upgrade command is executed, that software that are up to date doesn't try to download and install the same version.

Actual behavior

Up to date software gets re-downloaded and installed (in the example, Discord and AIMP).

Environment

[winget --info]
Windows Package Manager version: v1.0.11451
Windows: Windows.Desktop version: v10.0.19043.985
Package: Microsoft.DesktopAppInstaller version:  v1.11.11451.0

Any other software?
@ghost ghost added the Needs-Triage Issue need to be triaged label Jun 2, 2021
@jpbnetley
Copy link
Author

I did see this issue looks to be related: #1009

And saw he ran winget upgrade
I did the same, and saw that the versions don't match, this the reason it tries to install already up to date versions.

Name                          Id                                     Version                Available            Source
-----------------------------------------------------------------------------------------------------------------------
AIMP                          AIMP.AIMP                              v4.70.2251, 23.05.2021 4.70.2251            winget
Battle.Net                  Blizzard.BattleNet                     Unknown                      1.22.0.12040       winget
Discord                      Discord.Discord                        0.0.309                          1.0.9002             winget

I am guessing thats the reason.

@iDolmatov
Copy link

It was previously discussed that the version displayed and the version number are not the same. There are even times when the commercial version number is different from the actual version number in the program itself.
Variations in the display of the version number. So either you have to teach winget to interpret the version numbers, or read the version number from the program file (exe, dll, etc), which will be specified with a relative path in the manifest.

I cooperate with the AIMP player team and at the moment I was only able to make a limitation so that it would not be possible to downgrade the version number when updating. When a forced downgrade occurs, the player stops working with newer databases.

@lordraiden
Copy link

lordraiden commented Jun 2, 2021

Something similar happened to me. #1009

I did a first upgrade --all this 2 apps where updated, after that version becomes unknown and it tries to update every time although it is already updated.
Version number was recognized before upgrading with winget

image

image

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Jun 2, 2021
@nlxdodge
Copy link

nlxdodge commented Jun 4, 2021

PS C:\Users\NLxDoDge> winget upgrade
Name                Id                              Version                Available    Source
----------------------------------------------------------------------------------------------
AIMP                AIMP.AIMP                       v4.70.2251, 23.05.2021 4.70.2251    winget
Battle.Net          Blizzard.BattleNet              Unknown                1.22.0.12040 winget
Bulk Rename Utility TGRMNSoftware.BulkRenameUtility Unknown                3.4.3.0      winget
Discord             Discord.Discord                 1.0.9000               1.0.9002     winget
MEGASync            Mega.MEGASync                   Unknown                4.5.1.0      winget
Mozilla Thunderbird Mozilla.Thunderbird             78.10.2                78.11.0      winget
GOG Galaxy          GOG.Galaxy                      Unknown                2.0.37.384   winget
Windscribe          Windscribe.Windscribe           2.2 Build 10           latest       winget

These are all packages that have issues on my personal system. Each of these is the latest version, but tries to update.
For example: Windscribe uses latest as a version and some software reports an Unkown version on my system. But I installed everything with Winget.

Windows Package Manager v1.0.11451
Windows: Windows.Desktop v10.0.19043.1023
Package: Microsoft.DesktopAppInstaller v1.11.11451.0

@cheeseandjamsandwich
Copy link

I just experienced this issue.
It turned out that Blender and Teracopy that were repeatedly wanting to Upgrade each had two versions installed, listed in 'Apps and Features'. The current version and a previous version.
Uninstalling the older versions fixed this.

@delirium-sidhe
Copy link

delirium-sidhe commented Jun 10, 2021

Found another package that updates infinitely:

Name              Id                Version Available Source
------------------------------------------------------------
TechPowerUp GPU-Z TechPowerUp.GPU-Z Unknown 2.40.0    winget

@toygark
Copy link

toygark commented Jun 15, 2021

I have the same problem with Windscribe.

Windscribe Windscribe.Windscribe 2.2 Build 10 latest winget

@krystofkrticka
Copy link

krystofkrticka commented Jun 19, 2021

I also have this problem and I have it with Display Fusion installed from steam because in program and features there are two entries of display fusion one is for steam and the other one is for display fusion when installed normally.

image

"DisplayFusion 9.8" is the entry which is also created by standard installer when installing display fusion from official website but that entry called just "DisplayFusion" without any numbers is created by steam but winget falsely detects the steam entry instead of standard entry.

Here is screenshot of winget upgrade

image

In some cases Unknown version is created by laziness of app developer to add proper version number to application.

@dennisvanderpool
Copy link

image

I have same issue. Battle.Net keeps retrying due to the Unknown

@ImJoakim
Copy link
Contributor

I am also experiencing this issue..

@leochras #1191 (comment)

@denelon
Copy link
Contributor

denelon commented Sep 23, 2021

I believe we can address this with the v1.1 schema with multiple ARP entry support. The version in the manifest will be able to report a "marketing" version, but the ARP entry section can match what is actually installed.

@denelon
Copy link
Contributor

denelon commented Oct 1, 2021

#1073 (comment)

@denelon denelon modified the milestones: v.Next-Client, v1.2-Client Oct 1, 2021
@ashpatil-msft
Copy link
Contributor

This is similar to this issue: #1105

@ashpatil-msft
Copy link
Contributor

Version being reported as Unknown - This generally happens when a package does not provide a version in the Apps & Features entries that Windows Package Manager looks at. We are trying to improve this experience by providing an option to the publishers to add Apps & Features entries in the package manifest.

Packages with version as Latest - Some packages have version as "Latest" instead of specific version numbers like "1.2.3" in their manifests in winget-pkgs GitHub repo and are frequently updated. Thus Windows Package Manager attempts to update such packages whenever it sees a package with "Latest" version.

Packages that upgrade themselves - Some packages do upgrade themselves and might not want Windows Package Manager to upgrade or show them in the list. We are trying to improve this by providing an option to publishers to specify if a package upgrades itself in the package manifest.

Side by side installs - There is another open issue for those packages that allow multiple versions of the same package to be installed side by side and need not be upgraded when a latest version already exists on the machine.

@denelon
Copy link
Contributor

denelon commented Aug 5, 2022

I believe this has been addressed with Windows Package Manager 1.3.

Unknown versions are excluded from winget upgrade --all

Manifests can also now have AppsAndFeatures entries to allow a "marketing" version displayed for the user, but the upgrade comparison will be performed against the registry value for the software.

If this is not the case, then feel free to re-open the Issue and provide feedback.

@denelon denelon closed this as completed Aug 5, 2022
@vaughan-naidoo
Copy link

vaughan-naidoo commented May 8, 2024

Hi @denelon,

There is still an issue with repeated installation.

$ winget upgrade --all

Name               Id                        Version     Available   Source
---------------------------------------------------------------------------
Amazon Kindle      Amazon.Kindle             2.0.1.70350 2.3.0.70673 winget
Vim 9.1 (x64)      vim.vim                   9.1.0       9.1.0312    winget
foobar2000 v1.6.16 PeterPawlowski.foobar2000 1.6.16      2.1.4       winget
MySQL Shell 8.1.1  Oracle.MySQLShell         8.1.1       8.2.0       winget
4 upgrades available.
1 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.

Installing dependencies:
This package requires the following dependencies:
  - Packages
      Microsoft.VCRedist.2015+.x64
(1/3) Found Vim [vim.vim] Version 9.1.0312
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/vim/vim-win32-installer/releases/download/v9.1.0312/gvim_9.1.0312_x64.exe
  ██████████████████████████████  10.7 MB / 10.7 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(2/3) Found foobar2000 [PeterPawlowski.foobar2000] Version 2.1.4
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://www.foobar2000.org/files/foobar2000-x64_v2.1.4.exe
  ██████████████████████████████  6.48 MB / 6.48 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(3/3) Found MySQL Shell [Oracle.MySQLShell] Version 8.2.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://cdn.mysql.com/Downloads/MySQL-Shell/mysql-shell-8.2.0-windows-x86-64bit.msi
  ██████████████████████████████  60.9 MB / 60.9 MB
Successfully verified installer hash
Starting package install...
Successfully installed

$ winget upgrade

Name               Id                        Version     Available   Source
---------------------------------------------------------------------------
Amazon Kindle      Amazon.Kindle             2.0.1.70350 2.3.0.70673 winget
Vim 9.1 (x64)      vim.vim                   9.1.0       9.1.0312    winget
foobar2000 v1.6.16 PeterPawlowski.foobar2000 1.6.16      2.1.4       winget
MySQL Shell 8.1.1  Oracle.MySQLShell         8.1.1       8.2.0       winget
4 upgrades available.

$ winget --info

Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3447
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
Archived in project
Development

No branches or pull requests