summaryrefslogtreecommitdiff
path: root/tests/substitute.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-04-06 12:10:29 +0200
committerLudovic Courtès <ludo@gnu.org>2021-04-09 17:46:38 +0200
commit2d73086262e1fb33cd0f0f16f74a495fe06b38aa (patch)
tree4811dc7447842b834517ac1bf42127f897197428 /tests/substitute.scm
parentccff3380867b588f0c68e9daedd5728392a91a3f (diff)
daemon: 'guix substitute' replies on FD 4.
This avoids the situation where error messages would unintentionally go to stderr and be wrongfully interpreted as a reply by the daemon. Fixes <https://bugs.gnu.org/46362>. This is a followup to ee3226e9d54891c7e696912245e4904435be191c. * guix/scripts/substitute.scm (display-narinfo-data): Add 'port' parameter and honor it. (process-query): Likewise. (process-substitution): Likewise. (%error-to-file-descriptor-4?, with-redirected-error-port): Remove. (%reply-file-descriptor): New variable. (guix-substitute): Remove use of 'with-redirected-error-port'. Define 'reply-port' and pass it to 'process-query' and 'process-substitution'. * nix/libstore/build.cc (SubstitutionGoal::handleChildOutput): Swap 'builderOut' and 'fromAgent'. * nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter): Likewise. * tests/substitute.scm <top level>: Set '%reply-file-descriptor' rather than '%error-to-file-descriptor-4?'.
Diffstat (limited to 'tests/substitute.scm')
-rw-r--r--tests/substitute.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/substitute.scm b/tests/substitute.scm
index 697abc46840..21b513e1d87 100644
--- a/tests/substitute.scm
+++ b/tests/substitute.scm
@@ -1,6 +1,6 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org> 2;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
3;;; Copyright © 2014, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> 3;;; Copyright © 2014, 2015, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
4;;; 4;;;
5;;; This file is part of GNU Guix. 5;;; This file is part of GNU Guix.
6;;; 6;;;
@@ -198,7 +198,7 @@ a file for NARINFO."
198 198
199;; Never use file descriptor 4, unlike what happens when invoked by the 199;; Never use file descriptor 4, unlike what happens when invoked by the
200;; daemon. 200;; daemon.
201(%error-to-file-descriptor-4? #f) 201(%reply-file-descriptor #f)
202 202
203 203
204(test-equal "query narinfo without signature" 204(test-equal "query narinfo without signature"