-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add uninstall functionality to Com api #1909
Conversation
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentactivatable amd Archs dsc Globals hackathon mytool Packagedx parametermap whatifTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the git@github.com:yao-msft/winget-cli.git repository
|
// Get command queue name based on command name. | ||
std::string_view GetCommandQueueName(std::string_view commandName) | ||
{ | ||
if (commandName == "install" || commandName == "uninstall") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These strings should come from the command via a static function rather than be copied here. #Resolved
@@ -48,6 +48,8 @@ | |||
</com:Class> | |||
<com:Class Id ="3F85B9F4-487A-4C48-9035-2903F8A6D9E8" DisplayName="PackageMatchFilter Server"> | |||
</com:Class> | |||
<com:Class Id ="AA2A5C04-1AD9-46C4-B74F-6B334AD7EB8C" DisplayName="UninstallOptions Server"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder that we need to add it to the other package on pull.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'll do that on next pull.
enum PackageUninstallProgressState | ||
{ | ||
/// The uninstall is queued but not yet active. Cancellation of the IAsyncOperationWithProgress in this | ||
/// state will prevent the package from downloading or installing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// state will prevent the package from downloading or installing. | |
/// state will prevent the package from uninstalling. | |
``` #Resolved |
}; | ||
|
||
/// Progress object for the uninstall | ||
/// DESIGN NOTE: percentage for the uninstall as a whole is purposefully not included as there is no way to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove copied design note as there is a progress value that would satisfy this (if there is any point at which it actually means anything). #Resolved
Forgot to add that you should update the sample caller app to include uninstall and integration with the progress. |
I can do that in a separate pr later. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
|
||
/// Result of the install | ||
[contract(Microsoft.Management.Deployment.WindowsPackageManagerContract, 4)] | ||
runtimeclass UninstallResult |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change
Added uninstall functionality to Com api
Validation
Since the Com packaged tests are not ready yet, I manually verified the newly added uninstall api works on packages from winget source and msstore rest source.
Next I'll work on enabling Com tests as part of the e2e tests.
Microsoft Reviewers: Open in CodeFlow