This removes the main source of latency between subsequent downloads.
* nix/libstore/build.cc (SubstitutionGoal::tryToRun): Add a
"deduplicate" key to ENV.
(SubstitutionGoal::finished): Remove call to 'optimisePath'.
* guix/scripts/substitute.scm (process-substitution)[destination-in-store?]
[dump-file/deduplicate*]: New variables.
Pass #:dump-file to 'restore-file'.
* guix/scripts/substitute.scm (guix-substitute)[deduplicate?]: New
variable.
Pass #:deduplicate? to 'process-substitution'.
* guix/serialization.scm (dump-file): Export and augment 'dump-file'.
'guix substitute' now takes care of it via 'restore-file'.
* nix/libstore/build.cc (SubstitutionGoal::finished): Remove call to
'canonicalisePathMetaData'.
* tests/store.scm ("substitute")
("substitute + build-things with output path")
("substitute + build-things with specific output"): Call 'canonical-file?'.
* tests/substitute.scm ("substitute, authorized key"): Check the mtime
and permissions of "substitute-retrieved".
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.
Since breeze-icons are now longer united into breeze, these need to be
explicitly added.
* gnu/package/kde.scm (kdenlive)[inputs]: Add breeze-icons.
[argmuments]{phases}<wrap-executable>: Add breeze-icons to XDG_DATA_DIRS.
KDE breeze is separate from breeze-icons, as it can bee seen by
version, download path and git repository path being all different.
Thus a package containing both beeze and the breeze-icons contradicts
with this upstream separation.
* gnu/package/kde.scm (breeze-assets): Remove variable. (breeze): Move to ...
* gnu/package/kde-plasme.scm (breeze): here.
[version, source]: Copy from former breeze-assets.
[build-system]: Make explicit (was inherited even from breeze-icons).
[arguments]: Remove.
[native-inputs]: New element.
[inputs]: Copy from former breeze-assets; add some optional packages.
[home-page]: Fix and change to invent.kde.org.
[snopysis, description]: Adjust to de-unified package.
[licence]: Remove gpl3+, which came from breeze-icons.
* gnu/packages/chez.scm
(nanopass): Update to 1.9.1.
(stex): Update to 1.2.2.
(chez-scheme): Update to 9.5.4.
[inputs]: Add newly required lz4 and lz4:static.
[arguments]:
- Remove unused zlib symbol.
- Since we are using ZLIB=, it looks like the substitution of libz.a path in
.c/Mf-... files is no longer needed.
- add lz4-static symbol and use new LZ4= and ZLIB= configure options to
point to their static binaries.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <https://bugs.gnu.org/44985>.
Reported by Simon Josefsson <simon@josefsson.org>.
* guix/progress.scm (display-download-progress): Add #:tty? and honor it.
* guix/status.scm (print-build-event): Pass #:tty? to
'display-download-progress'.