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
debian: Support downloading from a mirror in addition to having it locally #12
Conversation
| if (debFname.isRemote) { | ||
| immutable path = buildPath (tmpDir, debFname.baseName); | ||
|
|
||
| downloadFile (debFname, path); |
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.
Shouldn't that be downloadIfNecessary? Otherwise we might unnecessarily download multiple times...
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.
downloadFile itself avoids re-downloading if the dest exists. Here I have the entire path, so it's easier to download directly; downloadIfNecessary is easier to use if you're constructing the path yourself from a base and suffix.
(That reminds me that downloadIfNecessary's doc comment needs expanding...)
|
Looks good to me, I will merge it when you report that it worked well on Ubuntu. |
|
It finished last night without crashing again (need to try the extra changes to see if those fix the out of memory fork fails). |
…d it if necessary
Otherwise the textual representation of the byte array is written -> [1, 2, 3, 4]
Retry 5 times by default.
This function is kind of weird, we might want to think of a better API for it.
|
Thanks a lot for working on this! |
I tried not to break local mirror support, but I haven't actually tested that I didn't...