diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-12-02 16:27:34 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-12-08 22:30:08 +0100 |
commit | 711df9ef3c04a0e0d7e844bed4c6b260ea1f65c1 (patch) | |
tree | 9234f4cfb72a844650ffcc8c18a8aac799fe519f /tests/guix-pack-localstatedir.sh | |
parent | a618a8c6203d4cf57f12873a86797b8685b11e14 (diff) | |
download | guix-711df9ef3c04a0e0d7e844bed4c6b260ea1f65c1.tar.gz |
daemon: Run 'guix substitute --substitute' as an agent.
This avoids spawning one substitute process per substitution. * nix/libstore/build.cc (class Worker)[substituter]: New field. [outPipe, logPipe, pid]: Remove. (class SubstitutionGoal)[expectedHashStr, status, substituter]: New fields. (SubstitutionGoal::timedOut): Adjust to check 'substituter'. (SubstitutionGoal::tryToRun): Remove references to 'outPipe' and 'logPipe'. Run "guix substitute --substitute" as an 'Agent'. Send the request with 'writeLine'. (SubstitutionGoal::finished): Likewise. (SubstitutionGoal::handleChildOutput): Change to fill in 'expectedHashStr' and 'status'. (SubstitutionGoal::handleEOF): Call 'wakeUp' unconditionally. (SubstitutionGoal::~SubstitutionGoal): Adjust to check 'substituter'. * guix/scripts/substitute.scm (process-substitution): Write "success\n" to stdout upon success. (%error-to-file-descriptor-4?): New variable. (guix-substitute): Set 'current-error-port' to file descriptor 4 unless (%error-to-file-descriptor-4?) is false. Remove "--substitute" arguments. Loop reading line from stdin. * tests/substitute.scm <top level>: Call '%error-to-file-descriptor-4?'. (request-substitution): New procedure. ("substitute, no signature") ("substitute, invalid hash") ("substitute, unauthorized key") ("substitute, authorized key") ("substitute, unauthorized narinfo comes first") ("substitute, unsigned narinfo comes first") ("substitute, first narinfo is unsigned and has wrong hash") ("substitute, first narinfo is unsigned and has wrong refs") ("substitute, two invalid narinfos") ("substitute, narinfo with several URLs"): Adjust to new "guix substitute --substitute" calling convention.
Diffstat (limited to 'tests/guix-pack-localstatedir.sh')
0 files changed, 0 insertions, 0 deletions