Ludovic Courtès <l...@gnu.org> skribis: >>From d85353dd4bfaa57a7d5803dade91d806a169295a Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <l...@gnu.org> > Date: Tue, 6 Apr 2021 12:10:29 +0200 > Subject: [PATCH] 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?'. > --- > guix/scripts/substitute.scm | 183 +++++++++++++++++------------------- > nix/libstore/build.cc | 4 +- > nix/libstore/local-store.cc | 12 +-- > tests/substitute.scm | 4 +- > 4 files changed, 95 insertions(+), 108 deletions(-)
Pushed as 2d73086262e1fb33cd0f0f16f74a495fe06b38aa with the corresponding ‘guix’ package update in ec8d09ee672e0d357bb5bb597464c8b168f14bfb. Ludo’.