GNU bug report logs -
#49425
[PATCH] guix-install.sh: Prompt for configuring substitutes discovery.
Previous Next
Full log
Message #22 received at 49425-done <at> debbugs.gnu.org (full text, mbox):
Hi!
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> +# Configure substitute discovery according to user's preferences.
>> +# $1 is the installed service file to edit.
>> +configure_substitute_discovery() {
>> +if grep -q -- '--discover=no' "$1" && \
>> + prompt_yes_no "Would you like to enable automatic substitute \
>> +discovery? (yes/no)"; then
>> + sed -i 's/--discover=no/--discover=yes/' "$1"
>> +fi
>> +}
>
> Indentation is off, compared to the other functions.
Good catch.
> Should the message say a bit more, similar to that in (gnu installer
> newt substitutes)?
>
> Otherwise LGTM!
I went with:
--8<---------------cut here---------------start------------->8---
-if grep -q -- '--discover=no' "$1" && \
- prompt_yes_no "Would you like to enable automatic substitute \
-discovery? (yes/no)"; then
- sed -i 's/--discover=no/--discover=yes/' "$1"
-fi
+ if grep -q -- '--discover=no' "$1" && \
+ prompt_yes_no "Would you like the Guix daemon to automatically \
+discover substitute servers on the local network? (yes/no)"; then
+ sed -i 's/--discover=no/--discover=yes/' "$1"
+ fi
}
--8<---------------cut here---------------end--------------->8---
and pushed as commit 4cbe0127a6.
> Note that someone running “yes | ./guix-install.sh” will now have
> substitutes enabled (whereas it’s off by default in
> <guix-configuration>). I suppose that’s fine though.
I think it's OK too. I like to think that someone typing yes |
./guix-install.sh wants the most complete setup, with all the bells and
whistles ("yes, all that" :-)).
Thanks!
Maxim
This bug report was last modified 3 years and 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.