msys2 / msys2-installer

The one-click installer for MSYS2
BSD 3-Clause "New" or "Revised" License
586 stars 87 forks source link

Winget integration is broken #47

Closed Danik1601 closed 2 years ago

Danik1601 commented 2 years ago

Recently I tried to update all my installed Win32 apps using Microsoft's Windows Package Manager aka "Winget" and I discovered this (first screenshot). MSYS2 does not update by any means. At first, I thought that the installer somehow is not working correctly with Winget but then I discovered this issue and realized that the whole version reporting system is broken. Please consider fixing this since that MSYS2 "package" alone breaks the whole Winget experience. On the second screenshot I tried to update MSYS2 using the newer .exe manually.

P.S. I have some conjectures on why this problem is not still fixed since this is very obvious and easy to find problem and I am almost certainly not the first one discovering this. My thoughts is that if you fix this, something else may break (I am really only guessing). If so, I propose very strange quirk to resolve issues with Winget. @Biswa96 in the above mentioned issue said:

That version number in Control Panel is just the version number of the installer and it has nothing to with packages version.

If that is correct, then this might work out. As you may see on third screenshot, I have GOG Galaxy installed on my machine. The GOG version is not reported to Windows OS so Winget does not know which version is installed. Since Winget 1.3 by default will be hiding packages that does not report their version, you may just make the installer stop reporting it's version to Windows just like GOG does. Please use this quirk only in case of emergency 😂.

image

image

image

Biswa96 commented 2 years ago

realized that the whole version reporting system is broken.

It's not broken. The version you're seeing in winget output is the the msys2 installer version. If you update packages in msys2 with pacman it's enough.

Danik1601 commented 2 years ago

It's not broken. The version you're seeing in winget output is the the msys2 installer version. If you update packages in msys2 with pacman it's enough.

Well, than why the installer even reporting it's version number? It breaks some things (e.g. Winget)

Biswa96 commented 2 years ago

why the installer even reporting it's version number?

Is there any other way to know if the msys2 installer is newer or older?

MehdiChinoune commented 2 years ago

msys2 should be removed from winget databases. The one who added it doesn't know about MSYS2 at all.

lazka commented 2 years ago

It's probably best to file an issue with winget. If they have any ideas on how we could improve the installer to better integrate it into their update process then we'd be happy to have a look.

Danik1601 commented 2 years ago

Is there any other way to know if the msys2 installer is newer or older?

What is the point if it performs one-time installation and then not getting updates forever after. Am I misunderstanding the concept?

MehdiChinoune commented 2 years ago

Is there any other way to know if the msys2 installer is newer or older?

What is the point if it performs one-time installation and then not getting updates forever after. Am I misunderstanding the concept?

MSYS2 has its own package manager called pacman. To update packages open any MSYS2 shell and write:

pacman -Syu
Danik1601 commented 2 years ago

MSYS2 has its own package manager called pacman. To update packages open any MSYS2 shell and write:

pacman -Syu

I installed the older version and updated it using pacman just like you said. It still reports the older version to the OS (first screenshot). No other updates are available, everything is up to date (second screenshot). Now I am completely lost and do not understand anything. As far as see (maybe not far enough) you just proved me that it is completely useless to report version number to the OS.

image

image

MehdiChinoune commented 2 years ago

Your MSYS2 is up to date, the msys2-version you see is the version of the installer.

Danik1601 commented 2 years ago

Your MSYS2 is up to date, the msys2-version you see is the version of the installer.

Ok, then why do I need to know the installer version? Is it possible to update it without deleting the old version first?

msys2 should be removed from winget databases.

I disagree since it is very useful in scripts and automation. For example I have all my installed programs written as list of Winget commands that I just copy-paste on my new machines, virtual machines or after system reinstallation to instal all these programs at once.