aboutsummaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-05-30 18:36:37 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-02 22:01:57 +0200
commitb8fa86adfc01205f1d942af8cb57515eb3726c52 (patch)
treef959c65b288df1ccf2912045ccd318debd6eff41 /doc/guix.texi
parentdec4b3aa18e24466841244c3e34b255201bbcc9e (diff)
downloadpatches-b8fa86adfc01205f1d942af8cb57515eb3726c52.tar
patches-b8fa86adfc01205f1d942af8cb57515eb3726c52.tar.gz
publish: '--compression' can be repeated.
This allows 'guix publish' to compress and advertise multiple compression methods from which users can choose. * guix/scripts/publish.scm (actual-compression): Rename to... (actual-compressions): ... this. Expect REQUESTED to be a list, and always return a list. (%default-options): Remove 'compression. (store-item->recutils): New procedure. (narinfo-string): Change #:compression to #:compressions (plural). Adjust accordingly. (render-narinfo, render-narinfo/cached): Likewise. (bake-narinfo+nar): Change #:compression to #:compressions. [compressed-nar-size]: New procedure. Call 'compress-nar' for each item returned by 'actual-compressions'. Create a narinfo for each compression. (effective-compression): New procedure. (make-request-handler): Change #:compression to #:compressions. Use 'effective-compression' to determine the applicable compression. (guix-publish): Adjust handling of '--compression'. Print a message for each compression that is enabled. * tests/publish.scm ("/*.narinfo"): Adjust to new narinfo field ordering. ("/*.narinfo with properly encoded '+' sign"): Likewise. ("/*.narinfo with lzip + gzip"): New test. ("with cache, lzip + gzip"): New test. * doc/guix.texi (Invoking guix publish): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 786788bad7..c01eb3a656 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9685,6 +9685,11 @@ run @command{guix publish} behind a caching proxy, or to use
allows @command{guix publish} to add @code{Content-Length} HTTP header
to its responses.
+This option can be repeated, in which case every substitute gets compressed
+using all the selected methods, and all of them are advertised. This is
+useful when users may not support all the compression methods: they can select
+the one they support.
+
@item --cache=@var{directory}
@itemx -c @var{directory}
Cache archives and meta-data (@code{.narinfo} URLs) to @var{directory}