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

Choco API's: Support for total progress bar and cancellation #2142

Open
tapika opened this issue Oct 17, 2020 · 4 comments
Open

Choco API's: Support for total progress bar and cancellation #2142

tapika opened this issue Oct 17, 2020 · 4 comments

Comments

@tapika
Copy link

tapika commented Oct 17, 2020

If choco downloads and/or installs multiple packages, there should be mechanism to observe total percentage, not only for local file.

chocolatey\infrastructure.app\nuget\NugetCommon.cs
packageDownloader.ProgressAvailable += (sender, e) =>

this event mechanism observes download progress of one file.

=> Need to have support for multiple files

Also at the moment choco does not provide mechanism for end-user to be able to cancel the download or install operation gracefully - newer API should support it.

src\chocolatey\infrastructure\commands\Execute.cs
var cancelToken = new CancellationTokenSource();

=> This should be centralized, and provided to end-user of API.

@tapika
Copy link
Author

tapika commented Oct 17, 2020

Potentially will solve this issue: #619

I've tested by myself cancellation, and for download it works ok, but for installation powershell exit is long waiting operation. Not sure if it's a problem, as it might be difficult to stop install process in overall.

@tapika
Copy link
Author

tapika commented Oct 17, 2020

Not sure how difficult would be to have built-in WPF UI, which can be activated over command line prompt, for example using --gui option.

@tapika
Copy link
Author

tapika commented Oct 17, 2020

To allow total progress bar to be estimated, I needed to harvest recursively all packages to get list of packages to be processed.

I suspect it should be default operation.

It allows to encounter problematic / missing package and stop operation before performing anything.

This is useful in case if you downloading 3 packages, and one of them is missing from server.

Potentially can fix issue: #1521

@tapika
Copy link
Author

tapika commented Oct 17, 2020

Can potentially solve this issue: #701

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

No branches or pull requests

1 participant