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

Do not re-download existing files #312

Open
jm33-m0 opened this issue Oct 13, 2022 · 2 comments
Open

Do not re-download existing files #312

jm33-m0 opened this issue Oct 13, 2022 · 2 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.

Comments

@jm33-m0
Copy link

jm33-m0 commented Oct 13, 2022

Description of the new feature / enhancement

Every time I try to execute wingetcreate to update/create manifests, it automatically RE-downloads installer files even if they have already been downloaded.

This is too annoying, imagine when you issue a command and it downloads GBs of data then throws an error.

Proposed technical implementation details

  1. Check if files are on local disk, ask users to use them
  2. If you have to download the file every time, at least give us an option to generate manifests using existing files instead of remote ones.
  3. Make downloads resumable.
@jm33-m0 jm33-m0 added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Oct 13, 2022
@ghost ghost added the Needs-Triage label Oct 13, 2022
@russellbanks
Copy link

Check if files are on local disk, ask users to use them

The issue with doing it this way is that manifest that is created has to have a remote InstallerUrl. winget-create can guarantee the values that its putting into the manifest are correct if it downloads and does the logic itself. The user could be asked for the file, like you said, but a lot of trust is placed on the user that the file that is being inputted is what would be retrieved from the remote URL, and there are lots of cases where the URL may stay the same but the file that it points to changes. Nightly releases, for example.

Make downloads resumable.

Having half-downloaded files persist on the user's disk isn't exactly clean as there's no guarantee that the user will ever even go back and resume it.

It can't be resumed either if we know the user will definitely retry it straight after as you're essentially creating an instance of winget-create while you use it, which is then closed once the command has finished running, so everything in memory that it was using is removed/no longer accessible. Alongside this, if a download has failed mid-way, it's probably going to be very difficult to resume and likely much more preferable to just try it again from scratch.

@mdanish-kh
Copy link
Contributor

@jm33-m0 This should be resolved partially in winget-create 1.2.7.0. WinGet-Create will no longer download from same URL twice. But in case of a failure, you would have to run the command again which will cause re-downloads. I am not sure how exactly your other requests can be catered because of the concerns raised by @russellbanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.
Projects
None yet
Development

No branches or pull requests

4 participants