microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.37k stars 4.29k forks source link

[Package Issue]: Facebook.Messenger bot is creating manifest with incorrect version number #99551

Open krystofkrticka opened 1 year ago

krystofkrticka commented 1 year ago

Please confirm these before moving forward

Category of the issue

Other

Brief description of your issue

I'm creating this issue only to make maintainers aver of issue with wingetbot's updates to manifest of this file. I already had FB Messenger installed on my computer and even upgraded to latest version but winget still thinks that there is newer version because part of version number is duplicate.

Steps to reproduce

Install lates version of messenger and then list available package upgrades using winget upgrade

Actual behavior

Winget still show that there is package update because in manifest is stated version 182.0.455264854.455264854 but installed is version 182.0.455264854

Expected behavior

Winget not showing update if latest version is already installed.

Environment

Windows Package Manager (Preview) v1.5.441-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.1413
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.441.0

Screenshots and Logs

image

krystofkrticka commented 1 year ago

Right now I'll manually fix version number but this needs to be fixed on bots side, because this will get annoying really quick, with fixing this issue manually every time there is an update.

krystofkrticka commented 1 year ago

Here is PR #99554 fixing this issue but still this needs to be fixed to avoid it in future.

mdanish-kh commented 1 year ago

The issue isn't unique to Facebook.Messenger, a number of packages suffer from this issue.

The reason is that wingetbot downloads the installer and fetches the ProductVersion field from the installer file. The issue is that not all publishers, including the publisher of this package, set this value identical to what they write to the Registry / Control Panel. As a result, wingetbot generates a PR with an incorrect version field that does not get accepted into the repo and someone else has to manually create a new PR for it. If you're interested, you can view the discussion in this PR https://github.com/microsoft/winget-pkgs/pull/85234 and the above linked issue to understand what has been considered so far as a solution.