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 Avoid name clash with 'build' from (guix store) and (guix status). 2019-02-11 23:23:28 +01:00
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 Avoid name clash with 'build' from (guix store) and (guix status). 2019-02-11 23:23:28 +01:00
describe.scm describe: Provide a hint when origin detection fails. 2019-04-28 22:57:06 +02:00
download.scm
edit.scm
environment.scm environment: Non ad-hoc mode also honors transformation options. 2019-05-07 15:46:53 +02:00
gc.scm guix gc: '-d' does not attempt to delete non-user-owned roots. 2019-04-11 18:18:13 +02:00
graph.scm graph: Factorize calls to 'fold-packages'. 2019-03-23 18:15:36 +01:00
hash.scm
import.scm
install.scm guix package: Add 'install', 'remove', and 'upgrade' aliases. 2019-04-29 10:13:44 +02:00
lint.scm lint: 'check-github-url' uses our own 'open-connection-for-uri'. 2019-04-18 17:43:56 +02:00
offload.scm
pack.scm pack: Warn when building an empty pack. 2019-05-22 00:09:41 +02:00
package.scm ui: Make package outputs searchable. 2019-05-09 00:10:34 -07:00
perform-download.scm
processes.scm processes: Gracefully handle daemons without clients. 2019-04-29 21:54:10 +02:00
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 refresh: Update the source code URL. 2019-03-27 14:59:42 +01:00
remove.scm guix package: Add 'install', 'remove', and 'upgrade' aliases. 2019-04-29 10:13:44 +02:00
repl.scm
search.scm guix package: Add 'guix search' alias. 2019-04-29 12:19:24 +02:00
size.scm size: Optimize dependency size computation. 2019-04-07 11:36:00 +02:00
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 guix package: Add 'install', 'remove', and 'upgrade' aliases. 2019-04-29 10:13:44 +02:00
weather.scm substitute: Select the best compression methods. 2019-06-02 22:01:57 +02:00