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

Mini spec on upcoming install and upgrade flow improvements #2535

Merged
merged 4 commits into from
Oct 11, 2022

Conversation

yao-msft
Copy link
Contributor

@yao-msft yao-msft commented Sep 20, 2022

null

Microsoft Reviewers: Open in CodeFlow

…es to winget install and winget upgrade flow.md
…es to winget install and winget upgrade flow.md
…es to winget install and winget upgrade flow.md
@yao-msft yao-msft requested a review from a team as a code owner September 20, 2022 18:45

- First, winget will try to record selected installer's architecture and locale for installation through winget
- winget will record architecture or locale from command as user intent. i.e. `winget install foo --architecture x86 --locale en-US`
- During upgrade flow installer selection, installer architecture or locale from previous installation will be treated as preference. Installer architecture or locale from user intent will be treated as requirement(i.e. the upgrade will fail if architecture or locale requirement cannot be met).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- During upgrade flow installer selection, installer architecture or locale from previous installation will be treated as preference. Installer architecture or locale from user intent will be treated as requirement(i.e. the upgrade will fail if architecture or locale requirement cannot be met).
- During upgrade flow installer selection, installer architecture or locale from previous installation will be treated as preference. Installer architecture or locale from user intent will be treated as requirement (i.e. the upgrade will fail if architecture or locale requirement cannot be met).

- winget will record architecture or locale from command as user intent. i.e. `winget install foo --architecture x86 --locale en-US`
- During upgrade flow installer selection, installer architecture or locale from previous installation will be treated as preference. Installer architecture or locale from user intent will be treated as requirement(i.e. the upgrade will fail if architecture or locale requirement cannot be met).

**Note**: This improvement only works for installations through winget. Due to current limitations of winget tracking implementation, winget will only honor metadata from last installation for the same package.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this been thought through for side-by-side architectures? For example, this is what I have on my machine:

PS D:\Git\winget-pkgs> winget list '.NET SDK'
Name                                                Id                                     Version      Available
-----------------------------------------------------------------------------------------------------------------
Microsoft .NET SDK 6.0.400 (x64) from Visual Studio {E90155B5-8B75-4892-A27D-D85D131A8E43} 6.4.22.37103
Microsoft .NET SDK 6.0.304 (x64)                    Microsoft.DotNet.SDK.6                 6.0.304      6.0.401
Microsoft .NET SDK 5.0.408 (x64)                    Microsoft.DotNet.SDK.6                 < 6.0.105    6.0.401
Microsoft .NET SDK 6.0.401 (x64)                    Microsoft.DotNet.SDK.6                 6.0.401
Microsoft .NET SDK 6.0.401 (x86)                    Microsoft.DotNet.SDK.6                 6.0.401
Microsoft .NET SDK 6.0.203 (x64)                    Microsoft.DotNet.SDK.6                 6.0.203      6.0.401
Microsoft .NET Core SDK 3.1.423 (x64)               Microsoft.DotNet.SDK.3_1               3.1.423

Notice 6.0.401 has both x86 and x64 installed. There isn't a --architecture switch for winget upgrade which is a separate issue altogether. However, I think that both installations would need to be tracked separately or else this will cause #2448 to become even more prominent.

Perhaps I'm thinking too deep into it and these are issues for a different spec. If that's the case, then perhaps some clarity that this does not consider those issues would be appreciated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current tracking implementation does not work well with side by side packages, I can clarify it in the Notes: section. Regarding --architecture option, I will add it when implementing the upgrade workflow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me; I just wasn't sure how big the scope here actually was. Makes sense that side-by-side is a separate issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, current winget code framework is based on 1 installed package to n available packages mapping. This causes winget not handling side by side very well. We're making small improvements here and there to make side by side scenarios better, but to solve the issue completely, the framework needs to be updated to handle n installed package to n available packages mapping.

@yao-msft yao-msft merged commit a8a19c7 into microsoft:master Oct 11, 2022
@yao-msft yao-msft deleted the installupgradedoc branch October 11, 2022 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants