* guix/transformations.scm (transform-package-source-git-url): Use the second
value of `package-git-url+recursive?'.
* tests/transformations.scm
("options->transformation, with-git-url, recursive? inheritance"): New test.
Change-Id: Ifd89bf1b0267f2b080b872cc7b318b9ae3706422
This changes the behaviour for the first one or few nars the substitute script
downloads, with uncompressed and zstd compressed nars prefered rather than
picking by file size.
* guix/scripts/substitute.scm: (%default-fast-decompression?): Change to #t.
* tests/substitute.scm ("substitute, preferred nar URL is 404, other is 200"):
Adjust test.
Change-Id: I89202f084cd6b9d506bcb3d46f75de690c6986b5
When reusing a HTTP connection to fetch multiple nars, and the remote server
signals that the connection should be closed.
* guix/substitutes.scm (download-nar): Close connections to substitute servers
when a Connection: close header is specified in the response.
Change-Id: Id3746c848a2157419060d5d968f724bc82a28e49
To be consistent with other procedures that make network requests.
* guix/substitutes.scm (download-nar): Add #:keep-alive? option.
* guix/scripts/substitute.scm (process-substitution/fallback)
(process-substitution): Call download-nar with #:keep-alive? #t.
Change-Id: I83b27d0c3a0916d058fbbbeb7aa77dbb8a742768
From the substitutes script. This makes it possible to use download-nar in
the the Guile guix-daemon.
* guix/scripts/substitute.scm (%fetch-timeout): Move down to where it's now
used.
(%random-state, with-timeout, catch-system-error, http-response-error?,
download-nar): Move to…
* guix/substitutes.scm: …here.
Change-Id: I8c09bf4b33cb5c6d042057d4d9adeb36c24c11dc
This is in preparation for moving the download-nar procedure out of the
script.
As well as calling open-connection-for-uri/cached, with-cached-connection adds
a single retry to the expression passed in, in the case of a exception that
suggests there's a problem with the cached connection. This is important
because download-nar/http-fetch doesn't check if a connection used for
multiple requests should be closed (because the servers set the relevant
response header).
To make download-nar more generic, have it take open-connection-for-uri as a
keyword argument, and replicate the with-cached-connection single retry by
closing the port in the case of a network error, and recalling
open-connection-for-uri. This will work fine in the case when connection
caching is not in use, as well as when open-connection-for-uri/cached is used,
since open-connection-for-uri/cached will open a new connection if the cached
port is closed.
* guix/scripts/substitute.scm (kind-and-args-exception?): Remove and inline
where necessary.
(call-with-cached-connection): Remove procedure.
(with-cached-connection): Remove syntax rule.
(http-response-error?): New procedure.
(download-nar): Add new #:open-connection-for-uri keyword argument and use it,
also replace with-cached-connection.
(process-substitution/fallback,process-substitution): Pass
#:open-connection-for-uri open-connection-for-uri/cached to download-nar.
Change-Id: I277b1d8dfef79aa1711755b10b9944da7c19157c
The substitute script checks for EPIPE errors, so this allows using
network-error?.
* guix/http-client.scm (network-error?): Include EPIPE.
Change-Id: I96d76d77997ed21a38bf9c41479fea67ab01e084
Plus remove http-get-error? from network-error? as http-get-error? doesn't
indicate a network error.
* guix/scripts/substitute.scm (process-substitution/fallback)
(process-substitution): Use http-get-error? with network-error?.
(system-error?, network-error?): Move from here…
* guix/http-client.scm: …to here, and also don't use http-get-error?.
Change-Id: I61ee9e5fbf90ebb76a34aa8b9ec8f5d74f8a3c54
As this moves download-nar in a direction where it could be used outside the
substitute script.
* guix/scripts/substitute.scm (download-nar): Return expected and actual
hashes and move status-port output to guix-substitute.
(process-substitution/fallback): Remove port argument, and move output to port
to guix-substitute.
(process-substitution): Return hashes from download-nar or
process-substitution/fallback, plus the narinfo.
(guix-substitute): Don't pass the reply-port in to process-substitution and
implement the messages to the reply-port here.
Change-Id: Icbddb9a47620b3520cdd2e8095f37a99824c1ce0
Pulling the logic up to the script makes this code more portable and not
reliant on setting a global variable.
* guix/scripts/substitute.scm (%prefer-fast-decompression?): Rename to…
(%default-fast-decompression?): this.
(call-with-cpu-usage-monitoring): Use multiple values to return the results
from the thunk as well as the cpu usage.
(display-narinfo-data): Update accordingly.
(download-nar): Add fast-decompression? as a keyword argument, remove
code to set! it and monitor the cpu-usage.
(process-substitution, process-substitution/fallback): Accept and pass through
fast-decompression? to download-nar.
(guix-substitute): Move the cpu usage monitoring and fast decompression
switching logic here.
Change-Id: I4e80b457b55bcda8c0ff4ee224dd94a55e1b24fb
Rather than just the port and response-content-length. I'm looking at using
the response headers within the substitute script to work out when to close
the connection.
* guix/http-client.scm (http-fetch): Return the response as the second value,
rather than the response-content-length.
* guix/build/download-nar.scm (download-nar): Adapt accordingly.
* guix/build/download.scm (url-fetch): Adapt accordingly.
* guix/scripts/substitute.scm (process-substitution): Adapt accordingly.
* guix/scripts/challenge.scm (call-with-nar): Adapt accordingly.
Change-Id: I490ecf7cef1f5ebbf1e6ed026f6a8fc9dacc56be
To reduce the codepaths in download-nar.
* guix/scripts/substitute.scm (with-timeout): Accept a #f duration and don't
set a timeout.
(download-nar): Remove the if for fetch-timeout.
Change-Id: I4e944a425a8612e96659dd84dd0e315012f080ab
* gnu/packages/bioinformatics.scm (bowtie): Update to 2.5.4.
[source]: Use G-Expressions in ’snippet.
[arguments]: Use G-Expressions.
<#:make-flags>: Add CC.
<#:phases>: Add ’tests? arguments to ’check phase; add ’fix-prefix.
[inputs]: Drop variables, add onetbb, delete tbb-2020 and
python-wrapper.
[native-inputs]: Add python-wrapper, which and perl-file-which.
Merges guix/guix!5491
Change-Id: I12686b06911c11170748b64af722c5311b2e542d
* guix/store.scm (open-connection): Require minor version #x61 or later.
(set-build-options): Remove now useless conditionals.
(build-things): Remove ‘build/old’ and the condition on the minor version.
Change-Id: I17835524ad7d69d29dba81292c6691212e200117
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
In commit 36457566f9 (2014), the
‘worker-protocol.hh’ defines #x10e as the protocol version. Thus, minor
versions lower than 14 existed in Nix but never existed in Guix.
* guix/store.scm (open-connection): Ensure minor version >= 14.
(set-build-options): Remove unnecessary conditionals on
‘store-connection-minor-version’.
(run-gc): Likewise.
Change-Id: I5fc32fbdf7412150ac81543b5da17d2c6f3473a1
Signed-off-by: Ludovic Courtès <ludo@gnu.org>