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

winget upgrade --all broken, if an application does not provide a version #1375

Closed
rhemberger opened this issue Aug 18, 2021 · 5 comments
Closed
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@rhemberger
Copy link

rhemberger commented Aug 18, 2021

Brief description of your issue

winget upgrade --all broken, if an application does not provide a version

Steps to reproduce

winget install AngusJohnson.ResourceHacker

winget upgrade --all

Expected behavior

As the uninstall entry does not provide DisplayVersion,
winget should ignore Resource Hacker and proceed with other packages.

https://docs.microsoft.com/en-us/windows/package-manager/winget/upgrade#upgrade---all
Some applications do not provide a version. They are always latest. Because the Windows Package Manager cannot identify if there is a newer version of the app, an upgrade will not be possible.

Actual behavior

winget reinstalls Resource Hacker and stops then

PS C:\WINDOWS\system32> winget upgrade
Name               ID                          Version Verfügbar   Quelle
-------------------------------------------------------------------------
MusicBrainz Picard MusicBrainz.Picard          2.6.3   2.6.30000.0 winget
Resource Hacker    AngusJohnson.ResourceHacker Unknown 5.1.8       winget
LibreOffice        LibreOffice.LibreOffice     7.1.4.2 7.1.5.2     winget
PS C:\WINDOWS\system32> winget upgrade --all
Gefunden Resource Hacker [AngusJohnson.ResourceHacker]
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert.
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern.
Downloading http://www.angusj.com/resourcehacker/reshacker_setup.exe
  ██████████████████████████████  3.98 MB / 3.98 MB
Der Installer-Hash wurde erfolgreich überprüft
Paketinstallation wird gestartet...
Erfolgreich installiert

Environment

[winget --info]
Windows Package Manager v1.0.11692
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.19043.1165
Paket: Microsoft.DesktopAppInstaller v1.12.11692.0


Any other software?
@ghost ghost added the Needs-Triage Issue need to be triaged label Aug 18, 2021
@denelon
Copy link
Contributor

denelon commented Aug 19, 2021

This looks like a duplicate of #752 or #1192.

@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 Aug 19, 2021
@rhemberger
Copy link
Author

There are some bug reports whose cause is a missing DisplayVersion value in the ARP entries. If I may make some suggestions:

  • Add a check to the validation pipeline and reject the manifest, if the DisplayVersion value does not match the PackageVersion winget-pkgs#25357
  • let winget upgrade ignore packages that do not report a version.
  • let winget check the ARP entries after successfull installation and add a missing DisplayVersion.
    PreInstall / PostInstall commands #1279 had a similar proposal, but this case could be automatically handled.

@denelon
Copy link
Contributor

denelon commented Aug 19, 2021

@rhemberger these are all good suggestions. We're looking to expand the validation pipeline behavior to help with these as well as enhancing the client.

Rather than just "reject" a manifest, we're hoping to add suggestions back to the PR author for the first item so the correct value can be included. In some cases there is a "marketing" version and a "package" version so the v1.1 schema will help here (it's in progress). Manifests will be able to have a display version and an Apps and Features version. This should also help the third point.

We may consider excluding packages that do not report a version from winget upgrade -all. At least we could inform the user they could winget upgrade <package> for those specific packages if they want to try an upgrade without knowing the consequences.

I don't believe we want to enable PreInstall / PostInstall commands, but there may be a set of behaviors we would be willing to build into the client to accomplish the same objective behaviors. I also don't think we want to add missing DisplayVersion values as this could have unintended consequences with future upgrades or functionality. This is more likely a case where the Independent Software Vendor (ISV)/Publisher should be engaged to improve their install experience for their customers.

I will go ahead and leave this Issue open since it's articulating the specific scenario for a missing version. It's linked to a couple of the other Issues related to this class of problem.

One of the key problems we're trying to solve is being able to work with any existing software installed on a system. That means we will still need to be able to upgrade packages when the installed version isn't reported, and the latest version also doesn't report it's version. If this continues to be a problem, we may enhance the manifest with additional metadata so the client can behave in a consistent manner, and the user can be informed.

The version "latest" is used in some of these cases in the community repository. Our current work with the experimental store source has led us to experiment with "unknown" rather than latest. This should help set a better expectation in the event a user attempts to "upgrade" when in fact the available version might be older so the actual result is a "downgrade".

@rhemberger
Copy link
Author

Thank you for your explanations. But I got three errors on winget upgrade now and it doesn't look like this will be fixed anytime soon. I apologize for not having searched the open issues more thoroughly beforehand. No need to let this issue open.
Winget is still very new in the world of software, and it's best to allow the developers time to decide how they would like their product experience to be for their customers. (#microsoft/winget-pkgs#16003 (comment), #microsoft/winget-pkgs#25357 (comment)).

@denelon
Copy link
Contributor

denelon commented Aug 20, 2021

You're welcome. Thanks for contributing! Customer feedback is the best way we know if we're focusing on the important issues. This product has been able to help many publishers learn a bit more about how customers perceive their products and experiences. It will take time for all of us working together to make experiences on Windows better.

@denelon denelon added this to the v1.3-Client milestone Jun 21, 2022
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
None yet
Development

No branches or pull requests

2 participants