guix-devel/guix/scripts
Ludovic Courtès b90ae065b5
substitute: Select the best compression methods.
When a server publishes several URLs with different compression methods,
'guix substitute' can now choose the best one among the compression
methods that it supports.

* guix/scripts/substitute.scm (<narinfo>)[uri]: Replace with...
[uris]: ... this.
[compression]: Replace with...
[compressions]: ... this.
[file-size]: Replace with...
[file-sizes]: ... this.
[file-hash]: Replace with...
[file-hashes]: ... this.
(narinfo-maker): Adjust accordingly.  Ensure 'file-sizes' and
'file-hashes' have the right length.
(assert-valid-signature, valid-narinfo?): Use the first element of
'narinfo-uris' in error messages.
(read-narinfo): Expect "URL", "Compression", "FileSize", and "FileHash"
to occur multiple times.
(display-narinfo-data): Call 'select-uri' to determine the file size.
(%compression-methods): New variable.
(supported-compression?, compresses-better?, select-uri): New
procedures.
(process-substitution): Call 'select-uri' to select the URI and
compression.
* guix/scripts/weather.scm (report-server-coverage): Account for all the
values returned by 'narinfo-file-sizes'.
* tests/substitute.scm ("substitute, narinfo with several URLs"): New
test.
2019-06-02 22:01:57 +02:00
..
container
import
system
archive.scm
authenticate.scm
build.scm guix build: Gracefully handle invalid '--with-git-url' specs. 2019-05-14 12:11:05 +02:00
challenge.scm substitute: Select the best compression methods. 2019-06-02 22:01:57 +02:00
container.scm
copy.scm
describe.scm
download.scm
edit.scm
environment.scm
gc.scm
graph.scm
hash.scm
import.scm
install.scm
lint.scm
offload.scm
pack.scm pack: Warn when building an empty pack. 2019-05-22 00:09:41 +02:00
package.scm
perform-download.scm
processes.scm
publish.scm publish: '--compression' can be repeated. 2019-06-02 22:01:57 +02:00
pull.scm pull: Display 'hash guix' hint when the new and old 'guix' are different. 2019-05-09 17:42:31 +02:00
refresh.scm
remove.scm
repl.scm
search.scm
size.scm
substitute.scm substitute: Select the best compression methods. 2019-06-02 22:01:57 +02:00
system.scm guix system: Type-check the file or expression. 2019-05-16 13:24:06 +02:00
upgrade.scm
weather.scm substitute: Select the best compression methods. 2019-06-02 22:01:57 +02:00