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
nix-channel --update redownloads when there is no update #888
Comments
The nixos.org channels aren't showing the Last-Modified header so that will also need to be added. This should be fairly trivial using the "If-Modified-Since" header in the perl line of Line 102 in 75d2492
|
The approach used in this script could probably be reused here. |
We'd need to set last modified header or similar for the apache. |
Using |
Related issue: If you have two channels pointing to the same URL, |
If we can just shift the channels over to S3, then they'd show an etag, which is (almost always) the MD5 of the content. |
We're now using S3 channel but this is still not fixed.
And the url is fetched each time. |
@domenkozar yeah, it won't magically work, but we now have the tools to make it work. Basically, you'd call a The alternative that requires one fewer request is to use one of the more advanced request headers as specified in http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html. So we'd compute the MD5 locally, then pass in |
Well, just matching the final URL would be enough for practical purposes, as it contains shortened commit hash. |
Anyone working on this? Kind of a buzzkill watching it run a no-op 8729 KiB download on every call to update. |
I don't think there's anyone... so it's free for taking ;-) |
I marked this as stale due to inactivity. → More info |
I closed this issue due to inactivity. → More info |
nix-channel --update
downloads are not efficient, because it will just download the same file over and over (after multiple calls), even if it is already locally available.There exist various mechanisms to determine whether a particular file was already downloaded before.
One such mechanism is the
-N
flag ofwget
. I don't care about which mechanism is used, as long as it is fixed.Priority to fix this is low, as it is an optimization.
The text was updated successfully, but these errors were encountered: