GNU bug report logs - #49425
[PATCH] guix-install.sh: Prompt for configuring substitutes discovery.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 5 Jul 2021 23:50:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 49425 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 49425 <at> debbugs.gnu.org
Subject: Re: bug#49425: [PATCH] guix-install.sh: Prompt for configuring
 substitutes discovery.
Date: Tue, 06 Jul 2021 16:44:48 +0200
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.

Should the message say a bit more, similar to that in (gnu installer
newt substitutes)?

Otherwise LGTM!

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.

Thanks,
Ludo’.




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.