guix-play/guix
Ludovic Courtès 9dfa20a22a
daemon: Let 'guix substitute' perform hash checks.
This way, the hash of the store item can be computed as it is restored,
thereby avoiding an additional file tree traversal ('hashPath' call)
later on in the daemon.  Consequently, it should reduce latency between
subsequent substitute downloads.

This is a followup to 5ff521452b.

* guix/scripts/substitute.scm (narinfo-hash-algorithm+value): New
procedure.
(process-substitution): Wrap INPUT into a hash input port, 'hashed', and
read from it.  Compare the actual and expected hashes, and print a
"hash-mismatch" status line when they differ.  When they match, print
not just "success" but also the nar hash and size.
* nix/libstore/build.cc (class SubstitutionGoal)[expectedHashStr]:
Remove.
(SubstitutionGoal::finished): Tokenize 'status'.  Parse it and handle
"success" and "hash-mismatch" accordingly.  Call 'hashPath' only when
the returned hash is not SHA256.
(SubstitutionGoal::handleChildOutput): Remove 'expectedHashStr'
handling.
* tests/substitute.scm ("substitute, invalid hash"): Rename to...
("substitute, invalid narinfo hash"): ... this.
("substitute, invalid hash"): New test.
2020-12-19 23:25:00 +01:00
..
build guix system: 'init' copies, resets timestamps, and deduplicates at once. 2020-12-15 17:32:11 +01:00
build-system import: cran: Update the Bioconductor version to 3.12. 2020-12-09 12:12:19 +01:00
import import: elpa: Support working with MELPA. 2020-12-18 12:37:26 +00:00
scripts daemon: Let 'guix substitute' perform hash checks. 2020-12-19 23:25:00 +01:00
store deduplicate: Create the '.links' directory lazily. 2020-12-15 17:32:12 +01:00
tests tests: Move OpenPGP helpers to (guix tests gnupg). 2020-06-16 16:10:46 +02:00
android-repo-download.scm android-repo-download: Remove unnecessary use of Guile-JSON. 2020-09-08 00:47:35 +02:00
avahi.scm avahi: Ignore local services. 2020-12-10 09:48:03 +01:00
base16.scm
base32.scm
base64.scm
build-system.scm packages: Add 'package-with-c-toolchain'. 2020-10-12 18:23:47 +02:00
bzr-download.scm
cache.scm Remove workaround for 'time-monotonic' in Guile 2.2.2. 2020-03-22 16:49:47 +01:00
channels.scm channels: Expose the default channel in %default-channel. 2020-11-28 00:06:14 +01:00
ci.scm ci: Add "evaluation" method. 2020-12-07 16:15:55 +01:00
colors.scm ui: Don't disable colors when INSIDE_EMACS is set. 2020-02-24 11:01:52 +01:00
combinators.scm combinators: Fix typo. 2020-07-05 03:15:08 +05:30
config.scm.in Use "guile-zlib" and "guile-lzlib" instead of (guix config). 2020-08-24 13:35:24 +02:00
cpio.scm linux-initrd: Add special-file->cpio-header*. 2020-11-22 11:03:31 +01:00
cve.scm lint: cve: Set a connection timeout. 2020-10-12 11:28:56 +02:00
cvs-download.scm Use guile-zlib extension in build-side code. 2020-08-24 10:41:06 +02:00
deprecation.scm deprecation: Add a two-element form for simple aliases. 2020-01-12 00:19:09 +01:00
derivations.scm derivations: Avoid uses of 'write' in 'write-derivation'. 2020-08-28 23:29:07 +02:00
describe.scm describe: Save the original value of (program-arguments). 2020-09-19 22:52:36 +02:00
diagnostics.scm diagnostics: Add '&formatted-message'. 2020-07-25 19:11:36 +02:00
discovery.scm discovery: Fix typo. 2020-07-05 16:07:59 +05:30
docker.scm
download.scm download: Update ImageMagick mirror list. 2020-12-13 01:05:57 +01:00
elf.scm
ftp-client.scm
gexp.scm gexp: Warn when importing (guix config) or (ice-9 …). 2020-11-05 16:13:50 +01:00
git-authenticate.scm Use 'formatted-message' instead of '&message' where appropriate. 2020-07-25 19:11:37 +02:00
git-download.scm Remove (guix json) and require Guile-JSON 4.3.0+. 2020-09-08 00:47:35 +02:00
git.scm git: 'reference-available?' handles short commit IDs. 2020-12-04 23:45:09 +01:00
glob.scm guix: Add globstar support. 2020-12-09 22:25:17 +01:00
gnu-maintenance.scm Use "guile-zlib" and "guile-lzlib" instead of (guix config). 2020-08-24 13:35:24 +02:00
gnupg.scm gnupg: Accept revoked keys. 2020-04-17 23:36:47 +02:00
grafts.scm grafts: Improve performance for derivations with many inputs. 2020-06-06 23:28:48 +02:00
graph.scm graph: Don't insist on "Helvetica" in the Graphviz backend. 2020-10-22 17:10:21 +02:00
hg-download.scm guix: hg-download: Add hg-predicate. 2020-11-14 10:27:00 +00:00
http-client.scm substitute: Cache and reuse connections while substituting. 2020-12-08 22:30:08 +01:00
i18n.scm
inferior.scm utils: Move <location> and '&error-location' to (guix diagnostics). 2020-07-25 19:11:36 +02:00
licenses.scm import: utils: Fix license name mismatches and define CUA-OPL-1.0. 2020-10-17 22:40:18 +02:00
lint.scm lint: Add 'check-haskell-stackage' checker. 2020-11-21 22:11:36 -05:00
man-db.scm Use "guile-zlib" and "guile-lzlib" instead of (guix config). 2020-08-24 13:35:24 +02:00
memoization.scm
modules.scm
monad-repl.scm
monads.scm
nar.scm database: Remove #:deduplicate? from 'register-items'. 2020-12-15 17:32:11 +01:00
openpgp.scm openpgp: '&openpgp-unrecognized-packet-error' includes type tag. 2020-10-14 15:22:55 +02:00
packages.scm packages: Better preserve object identity when rewriting. 2020-10-20 16:30:15 +02:00
pki.scm
profiles.scm profiles: Delete duplicate manifest entries in packages->manifest. 2020-12-07 12:48:26 +01:00
profiling.scm
progress.scm status: Do not emit ANSI escapes when stderr is not a tty. 2020-12-18 16:13:39 +01:00
quirks.scm quirks: Adjust patch to allow traveling back to Dec. 2018. 2020-07-24 18:56:25 +02:00
records.scm records: Have ABI check work well for cross-compilation. 2020-04-08 00:05:45 +02:00
remote.scm Use 'formatted-message' instead of '&message' where appropriate. 2020-07-25 19:11:37 +02:00
repl.scm repl: Return stack traces along with exceptions. 2020-03-19 15:14:08 +01:00
scripts.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
search-paths.scm
self.scm self: Remove the empty string from '%load-extensions'. 2020-12-11 19:06:54 +01:00
serialization.scm nar: Deduplicate files right as they are restored. 2020-12-15 17:32:09 +01:00
sets.scm
ssh.scm ssh: Fix progress bar crash when there are zero items to send. 2020-09-02 23:59:24 +02:00
status.scm status: Do not emit ANSI escapes when stderr is not a tty. 2020-12-18 16:13:39 +01:00
store.scm store: Fix ensure-path docstring. 2020-11-23 14:10:34 +01:00
svn-download.scm guix: Fix download-svn-to-store. 2020-09-14 14:24:29 +01:00
swh.scm Remove (guix json) and require Guile-JSON 4.3.0+. 2020-09-08 00:47:35 +02:00
tests.scm tests: Do not fetch and print the random seed from the top level. 2020-10-20 16:30:16 +02:00
transformations.scm transformations: Show '--help-transform' only where applicable. 2020-11-21 12:39:14 +01:00
ui.scm ui: Handle multiword and empty $PAGER values. 2020-12-05 16:47:59 +01:00
upstream.scm upstream: Handle the case where the file name has no extension. 2020-07-27 13:35:49 +02:00
utils.scm utils: Add 'cxx-for-target'. 2020-11-16 10:26:46 +01:00
workers.scm