Subject: Re: bug#28749: guix build --subsitute-urls does not override guix-daemon run with --no-subsitutes

From: Maxim Cournoyer <[email-masked]>
Date: Fri, 13 Oct 2017 09:59:18 -0400

Leo Famulari <[email-masked]> writes:

> On Sun, Oct 08, 2017 at 01:13:16PM -0400, Drashne wrote:
>> From the kind people on #guix, I've heard that "guix build
>> --subsitute-urls" should override "guix-daemon --no-subsitutes", but
>> it seems it's not doing so for me.
>
> The documentation of guix-daemon [0] says this on the subject:
>
> "When the daemon runs with --no-substitutes, clients can still
> explicitly enable substitution via the set-build-options remote
> procedure call (see The Store)."
>
> So, there is a way for unprivileged users to enable substitution for
> themselves even when the local administrator has disabled substitution,
> but it's not via the --substitute-urls mechanism.
>
> I'm closing this bug because I think it's mostly a case of having
> received mistaken advice on #guix.

Eh, I'm sorry I was the one suggesting to open this bug report in the
first place!

Although, I would argue that the current behavior is
non-intuitive. While true that the manual skim about how one can achieve
this, the reference to "The Store" is not helpful; it doesn't even
mention the "set-build-options" procedure. Also, leaving the command
line to plug directly into Guix's API from Guile is inconvenient at best.

It seems to me that the current behavior of other options that affect
the guix-daemon operation are that user options override the
corresponding guix-daemon defaults; maybe that's what lead me and others
to think that --substitute-urls should attempt to do what the user
desires?

Otherwise, we could at least give advice on the output of a Guix command
when the user passed --substitute-urls when the guix-daemon substitutes
were disabled to make this clear(er).

My 2 cents,

Maxim