substitute: Don't fetch /nix-cache-info.
authorLudovic Courtès <ludo@gnu.org>
Thu, 21 Nov 2019 19:36:20 +0000 (20:36 +0100)
committerLudovic Courtès <ludo@gnu.org>
Fri, 22 Nov 2019 11:17:42 +0000 (12:17 +0100)
commit4f5234be0378368e6af25925db46612838d25e58
treefadd4b69c92439445e9c9cd22136c14ee3c7423d
parent4e2e84d85687e02725d156b40bdfd6b20dca0eed
substitute: Don't fetch /nix-cache-info.

This avoids one GET request every time 'fetch-narinfos' is called.
The file itself was essentially useless.

* guix/scripts/substitute.scm (<cache-info>, download-cache-info):
Remove.
(%unreachable-hosts): New variable.
(open-connection-for-uri/maybe): New procedure.
(fetch-narinfos)[handle-narinfo-response]: Check whether NARINFO has its
'path' under (%store-prefix) and ignore it otherwise.  Move
'update-progress!' call before 'if'.
[do-fetch]: Remove 'port' parameter.  Use
'open-connection-for-uri/maybe'.
Remove call to 'download-cache-info'.
guix/scripts/substitute.scm