Skip to content

winget doesn't go from highest to lowest dependency version to resolve installer #5902

@MagicAndre1981

Description

@MagicAndre1981

Git for Windows removed x86 support some time ago, but TortoiseGit still supports it. As it turns out, when define Git.Git as dependency winget only tries the latest Git version which is 64, arm64 only now and fails to resolve x86 installer:

2025-11-28 08:45:09.026 [CLI ] Market Filter created with market: DE
2025-11-28 08:45:09.026 [CLI ] Locale Comparator created with Required Locales: [] , Preferred Locales: [de-DE] , IsInstalledLocale: 0
2025-11-28 08:45:09.026 [CLI ] Architecture Comparator created with allowed architectures: [X86, Neutral]
2025-11-28 08:45:09.026 [CLI ] Starting installer selection.
2025-11-28 08:45:09.027 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:45:09.027 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:45:09.027 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:45:09.027 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:45:09.028 [CLI ] No suitable installer found for manifest Git.Git with version 2.52.0
2025-11-28 08:45:09.028 [REPO] Search request meets optimized search criteria.

but trying to install git works fine as it picks the latest version 2.48.1 with x86 installer:

image

And winget always trying to use last version of dependency and can't fall back to older matching version. But during normal install winget fins the best matching version starting from newest down to older versions until it finds the correct installer:

2025-11-28 08:48:35.629 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.52.0/eae0]
2025-11-28 08:48:35.629 [YAML] Detected UTF-8
2025-11-28 08:48:35.631 [CLI ] Starting installer selection.
2025-11-28 08:48:35.631 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.631 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.631 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.631 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.632 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.51.2/4f3e]
2025-11-28 08:48:35.678 [YAML] Detected UTF-8
2025-11-28 08:48:35.681 [CLI ] Starting installer selection.
2025-11-28 08:48:35.681 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.681 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.681 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.681 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.681 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.51.1/02b1]
2025-11-28 08:48:35.722 [YAML] Detected UTF-8
2025-11-28 08:48:35.724 [CLI ] Starting installer selection.
2025-11-28 08:48:35.724 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.724 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.724 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.724 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.725 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.51.0.2/8696]
2025-11-28 08:48:35.757 [YAML] Detected UTF-8
2025-11-28 08:48:35.760 [CLI ] Starting installer selection.
2025-11-28 08:48:35.760 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.760 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.760 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.760 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.760 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.51.0/8696]
2025-11-28 08:48:35.799 [YAML] Detected UTF-8
2025-11-28 08:48:35.801 [CLI ] Starting installer selection.
2025-11-28 08:48:35.801 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.801 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.801 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.801 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.801 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.50.1/8696]
2025-11-28 08:48:35.842 [YAML] Detected UTF-8
2025-11-28 08:48:35.844 [CLI ] Starting installer selection.
2025-11-28 08:48:35.844 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.844 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.844 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.845 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.845 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.50.0.2/8696]
2025-11-28 08:48:35.883 [YAML] Detected UTF-8
2025-11-28 08:48:35.886 [CLI ] Starting installer selection.
2025-11-28 08:48:35.886 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.886 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.886 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.886 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.886 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.50.0/8696]
2025-11-28 08:48:35.923 [YAML] Detected UTF-8
2025-11-28 08:48:35.925 [CLI ] Starting installer selection.
2025-11-28 08:48:35.925 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.925 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.925 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.925 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.926 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.49.0/8696]
2025-11-28 08:48:35.966 [YAML] Detected UTF-8
2025-11-28 08:48:35.968 [CLI ] Starting installer selection.
2025-11-28 08:48:35.968 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.968 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.968 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.968 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.969 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.48.1/8696]
2025-11-28 08:48:36.007 [YAML] Detected UTF-8
2025-11-28 08:48:36.009 [CLI ] Starting installer selection.
2025-11-28 08:48:36.009 [CLI ] Installer [X86,inno,User,] is current best choice
2025-11-28 08:48:36.009 [CLI ] Installer [X86,inno,User,] is better [strong] than [X86,inno,Machine,] due to: Scope
2025-11-28 08:48:36.009 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:36.009 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:36.009 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:36.009 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:36.009 [CLI ] Completed installer selection.
2025-11-28 08:48:36.009 [CLI ] Selected installer Architecture: 1
2025-11-28 08:48:36.009 [CLI ] Selected installer URL: https://github.com/git-for-windows/git/releases/download/v2.48.1.windows.1/Git-2.48.1-32-bit.exe
2025-11-28 08:48:36.009 [CLI ] Selected installer InstallerType: inno

So, now we need to figure out a way to force winget to do the same when git is defined as dependency.

Originally posted by @MagicAndre1981 in microsoft/winget-pkgs#314972 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    DependenciesRelated to package level dependenciesIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions