Subject: [bug#70494] [PATCH 12/23] scripts: substitute: Extract script specific output from download-nar.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 16 May 2024 18:13:13 +0200

Christopher Baines <[email-masked]> skribis:

> As this moves download-nar in a direction where it could be used outside the
> substitute script.

Note that there’s already (guix build download-nar), which is less
capable.

> * guix/scripts/substitute.scm (download-nar): Return expected and actual
> hashes and move status-port output to guix-substitute.
> (process-substitution/fallback): Remove port argument, and move output to port
> to guix-substitute.
> (process-substitution): Return hashes from download-nar or
> process-substitution/fallback, plus the narinfo.
> (guix-substitute): Don't pass the reply-port in to process-substitution and
> implement the messages to the reply-port here.

I’m not quite convinced.  In particular, procedures returning more than
two values look confusing to me.  Maybe it’s not the right level to
generalize things?

Ludo’.