GNU bug report logs - #33134
[PATCH 0/1] guix-install.sh: Add ability to run it non-interactively.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: rsiddharth <s@HIDDEN>; Keywords: patch; dated Wed, 24 Oct 2018 00:17:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 9 Nov 2018 04:15:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 08 23:15:41 2018
Received: from localhost ([127.0.0.1]:42129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gKyCq-0001m7-T5
	for submit <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:15:41 -0500
Received: from lyra.ricketyspace.net ([159.89.229.91]:42124)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gKyCp-0001ly-2M
 for 33134 <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:15:39 -0500
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541736938;
 bh=+wSVX5PEA2HD0p2E+n/OOPfraPjDDmGK9bzD9x8vWD8=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=PtO5gI0wdCrJhMuCpq7Lto/Wx625TBT8SV88+JvsMB3tZ2kIaELBsfFJiUySr21JG
 1ecn88HmnB4/9E7xmDlg1WT5tbjuOI/qqBb882EPqRQ8m3cpDiuGB4j2uTRbHJIMxX
 MmnNJqcJnxij6P6EJ5xOsvegwYIGvMK5ohl4LvsW3jQha6HN+vM9B06Bihy4hi/twi
 h1kFdqHBJTpG6yYW9moz/FbM+iggXI1yQ7MTK5Xy3Zj7qgwh6O51N3yysM20QQho4k
 zRQ6og5PVtnpWpWjdokg8O7O5YGQIXteBDWm2yoC38e/J2o1thhUzzOuEy50nEX23j
 +U8vf6xFgWkBQ==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 4/4] guix-install.sh: Update sys_authorize_build_farms.
Date: Thu,  8 Nov 2018 23:15:34 -0500
Message-Id: <20181109041534.4489-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181109041301.39042-1-s@HIDDEN>
References: <20181109041301.39042-1-s@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (sys_authorize_build_farms): Don't prompt
if AUTO_YN is set.
---
 etc/guix-install.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 16686ff89..cbcf5316d 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -355,8 +355,11 @@ sys_enable_guix_daemon()
 
 sys_authorize_build_farms()
 { # authorize the public keys of the two build farms
+    local yn=$AUTO_YN
+
     while true; do
-        read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn
+        [[ -n $yn ]] || read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn
+
         case $yn in
             [Yy]*) guix archive --authorize < "${ROOT_HOME}/.guix-profile/share/guix/hydra.gnu.org.pub" &&
                          _msg "${PAS}Authorized public key for hydra.gnu.org";
@@ -365,7 +368,7 @@ sys_authorize_build_farms()
                    break;;
             [Nn]*) _msg "${INF}Skipped authorizing build farm public keys"
                    break;;
-            *) _msg "Please answer yes or no.";
+            *) _msg "Please answer yes or no."; yn=""
         esac
     done
 }
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 9 Nov 2018 04:15:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 08 23:15:26 2018
Received: from localhost ([127.0.0.1]:42125 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gKyCc-0001lf-Kc
	for submit <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:15:26 -0500
Received: from lyra.ricketyspace.net ([159.89.229.91]:42120)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gKyCb-0001lY-Dc
 for 33134 <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:15:25 -0500
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541736925;
 bh=hbW7y2AWrlZQ85TfDwgX5mvQn99WAXqOVJdzg8nvlG8=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=BcqrbPLuqW4gcjvskjS4VeFplNFeucDsDeM2UhOhx5/INNA+3VBbwvaQTwAMWX2wA
 Uq5IEVcSnqBHx5d8Tg0bu64MnTLNHSXWGEGliVdybC68dkVCl7wlz9lchu1+OCM9B3
 3krva8T7x6SEogkFWVylVHhFCYUPqyzxmKKkUeV/tJrjBtizucQh0DnqwCncgRAxfr
 9efQJ79fU6Gs0UWPwFDWjPGEsEMUC6cmxv4tRxw+Uci5LuEg58Q3hiHC1kIZehW8XQ
 hR4lbHjQWcrLN59+kTV0w7L4S8V0vzatm/bpiJP1j/5zQdquGPXSnWkvuno71aAFo2
 OcF36ffH/IVfw==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 3/4] guix-install.sh: Update welcome.
Date: Thu,  8 Nov 2018 23:15:19 -0500
Message-Id: <20181109041519.31283-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181109041301.39042-1-s@HIDDEN>
References: <20181109041301.39042-1-s@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (welcome): Don't prompt if AUTO_YN is set.
---
 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 23c5f5da2..16686ff89 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -413,7 +413,7 @@ This script installs GNU Guix on your system
 https://www.gnu.org/software/guix/
 EOF
     echo -n "Press return to continue..."
-    read -r  ANSWER
+    [[ -n $AUTO_YN ]] || read -r  ANSWER
 }
 
 main()
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 9 Nov 2018 04:15:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 08 23:15:12 2018
Received: from localhost ([127.0.0.1]:42121 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gKyCO-0001lD-Cw
	for submit <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:15:12 -0500
Received: from lyra.ricketyspace.net ([159.89.229.91]:42116)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gKyCN-0001l5-7C
 for 33134 <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:15:11 -0500
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541736911;
 bh=I4tbfK30eG9mxLTyeS7yb5XWLt6DDW1OAxyHldGCXcA=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=3em875oCq/JzkDAzIt+kHWEsVWZReBKh2HdGVSxlhtQYsgC4mz6XdlkQ+jBPJ+8jA
 EJEXbCWQnbTtFMgUQZn5SzfUTM2P4OsRU1KIFDLA8STxR5seaV/Rwv2/hBwrCO18f0
 eBXv6sP2N98d7TS0+CjWlM4ZyraR227gFwIGylMQ0pFvGMuHTWfSIUIY6pQ/U3prGp
 Dg7+A4XDiZDK42mNxRey8Goi6XpOdu6auFBaNDNzmn0S8rxmkOaqqtyvVIXaAKgQs7
 4zI0pOYIntpylW4U5Tu8am8oGN1HsTEPMi1VfHYzL2AfmiVdOY1IKbcK1A+I8hD2iS
 gMfyRT+yYYzaA==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 2/4] guix-install.sh: Update main.
Date: Thu,  8 Nov 2018 23:15:07 -0500
Message-Id: <20181109041507.17846-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181109041301.39042-1-s@HIDDEN>
References: <20181109041301.39042-1-s@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (main): Call parse_args.
---
 etc/guix-install.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 3191d1be9..23c5f5da2 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -418,6 +418,8 @@ EOF
 
 main()
 {
+    parse_args "$@"
+
     local tmp_path
     welcome
 
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 9 Nov 2018 04:14:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 08 23:14:57 2018
Received: from localhost ([127.0.0.1]:42116 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gKyC9-0001k0-4F
	for submit <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:14:57 -0500
Received: from lyra.ricketyspace.net ([159.89.229.91]:42112)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gKyC8-0001jt-AP
 for 33134 <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:14:56 -0500
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541736896;
 bh=89D7C8oyISSth0RqravGV31aDn95JGjG8SZsU/iVoiQ=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=zaMuyBeWAPxXHbn/SBfPuwpJV62Q4BVPQpsyUL4JV8gCmoKZ+ANUoSmjZcWnubhNF
 jJE8FFWkT+TIXnLZisG68kCsOb2cGFNoBJX2Za9EieBSyRxjIhIilwKzSKea+6WFzv
 p01IHNuV8ppKAxPkWTjapSSp5azmUlKg2BeQ/OBczeDvN/a54CQsxbli6w7oxBpcm0
 av1qmkrXQYAgUIdb4syLI3Y97PG8TYthz/PNKiR3JFJ5k+1tfUJuCRB8sZrWs3u6T8
 T5yiUGDA6H0xbD1lPvsksGu3hsSjEVSCMJyyHtA3OxLkc/aiJwSjvJ2RwwwCtEHmQD
 nSwZmuaFJMBoQ==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 1/4] guix-install.sh: Add parse_args.
Date: Thu,  8 Nov 2018 23:14:37 -0500
Message-Id: <20181109041437.45557-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181109041301.39042-1-s@HIDDEN>
References: <20181109041301.39042-1-s@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (parse_args): New function.
---
 etc/guix-install.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index ca6874ba0..3191d1be9 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -370,6 +370,21 @@ sys_authorize_build_farms()
     done
 }
 
+parse_args()
+{
+    local args_num=$#
+
+    if [ $args_num -lt 1 ]; then
+        return
+    fi
+
+    # process -y / -n arg.
+    AUTO_YN=${1:1:1}
+    if [ -z $AUTO_YN ]; then
+        AUTO_YN=""
+    fi
+}
+
 welcome()
 {
     cat<<"EOF"
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 9 Nov 2018 04:13:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 08 23:13:12 2018
Received: from localhost ([127.0.0.1]:42111 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gKyAR-0001hZ-Nb
	for submit <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:13:11 -0500
Received: from lyra.ricketyspace.net ([159.89.229.91]:42104)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gKyAP-0001hR-Nc
 for 33134 <at> debbugs.gnu.org; Thu, 08 Nov 2018 23:13:10 -0500
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541736789;
 bh=Kfx/GHleTtPYj+ChDk5ICUWVZt3zP/Z6OgHdnLNXbNs=;
 h=From:To:Cc:Subject:Date:From;
 b=vMNyQdTGeNzYSSgKp8VzMSb3+xCgvxgcSNm1NTL4gjPGzUeJlcxhzXN+kL/WcoQoD
 Z7iSAZCzs8MMzMY9blQglwW13XNbtktpjsAvDUvNlmWF3MuEAKhcFXAWW3tWeuoecW
 yqaqpM+s422cMQ8L05gzvGraJ1CqbkTe4regBF76oic1FA7IwMETsBNkDK6qGLG6ee
 rc7GoEt3X4LiFmmfzniXlPbrRMHFvD1WHT7INbxV1s10/pd9qZfv1p+NsCqB7X5wYM
 30p/0ydzW56ERHCSiAKyp5IF/QZb1iMcCjIcyth+Lb+5BzBoRC3g6eAq4UF1FKiZ6y
 KRbgtV/Ppw4TQ==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 0/4] [Refactor 0] Add auto yes/no switch to guix-install.sh
Date: Thu,  8 Nov 2018 23:13:01 -0500
Message-Id: <20181109041301.39042-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Thanks Danny, I've refactored the patch based on your feedack.

Danny Milosavljevic wrote:

>> +    # process -y / -n arg.
>> +    export AUTO_YN=${1:1:1}
>> +    if [ -z $AUTO_YN ]; then
>> +        export AUTO_YN=""
>> +    fi

> Why "export" ? Now all the child processes get it, making their environment
> different from before.  This makes parse_args have system-wide side effects.

Remove the `export`.

>> ...
>>  
>>  main()
>>  {
>> +    parse_args $@
>> +

> Should be
>
>   "$@"
>
>with quotes

Done.

>> ...
>> ...
>>  https://www.gnu.org/software/guix/
>>  EOF
>>      echo -n "Press return to continue..."
>> -    read -r  ANSWER
>> +    read -N 1 -r  ANSWER

> While it's nice for the interactive user, doesn't this break
>
>  yes | ./guix-install.sh
>
> because now it doesn't wait for the newline?

Yes, it would break `yes | ./guix-install.sh`. I've removed `-N 1` from the `read` statement.


>> -            *) _msg "Please answer yes or no.";
>> +            *) _msg "Please answer yes or no."; yn=""

> Does this make it conditionally interactive?  Would it be better to "exit 1" here?

When the user is running the script interactively and answers, say "Oui", we
arrive at the:

                 *) _msg "Please answer yes or no.";

case. After this, we go to the beginning of the loop:

                 [[ -n $yn ]] || read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn

Since $yn is "Oui" `[[ -n $yn ]]` will evaluate to true, the user won't be
prompted again, we'll go back to:

                 *) _msg "Please answer yes or no."

and this will repeat infinitely.

The `yn=""` was added:

                 *) _msg "Please answer yes or no."; yn=""

to reset the value of yn, so that `[[ -n $yn ]]` will evaluate to false and
the user will be prompted again for answer.

rsiddharth (4):
  guix-install.sh: Add parse_args.
  guix-install.sh: Update main.
  guix-install.sh: Update welcome.
  guix-install.sh: Update sys_authorize_build_farms.

 etc/guix-install.sh | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 6 Nov 2018 11:32:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 06 06:32:37 2018
Received: from localhost ([127.0.0.1]:36085 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gJzb2-0001DG-L1
	for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 06:32:36 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:37606)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1gJzb0-0001D8-TN
 for 33134 <at> debbugs.gnu.org; Tue, 06 Nov 2018 06:32:35 -0500
Received: from localhost (178.113.175.117.wireless.dyn.drei.com
 [178.113.175.117])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id DE0733361682;
 Tue,  6 Nov 2018 12:32:33 +0100 (CET)
Date: Tue, 6 Nov 2018 12:32:32 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: rsiddharth <s@HIDDEN>
Subject: Re: [bug#33134] [PATCH 1/5] guix-install.sh: Update welcome.
Message-ID: <20181106123232.22408e9b@HIDDEN>
In-Reply-To: <20181103011034.70086-1-s@HIDDEN>
References: <20181024115443.GA1297@macbook41>
 <20181103011034.70086-1-s@HIDDEN>
X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/oUVX8aZjqUTWkpSTXnXMX9q"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33134
Cc: 33134 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/oUVX8aZjqUTWkpSTXnXMX9q
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Fri,  2 Nov 2018 21:10:34 -0400
rsiddharth <s@HIDDEN> wrote:

> * etc/guix-install.sh (welcome): Read exactly one character from input.
> ---
>  etc/guix-install.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/etc/guix-install.sh b/etc/guix-install.sh
> index ca6874ba0..cf839c20e 100755
> --- a/etc/guix-install.sh
> +++ b/etc/guix-install.sh
> @@ -398,7 +398,7 @@ This script installs GNU Guix on your system
>  https://www.gnu.org/software/guix/
>  EOF
>      echo -n "Press return to continue..."
> -    read -r  ANSWER
> +    read -N 1 -r  ANSWER

While it's nice for the interactive user, doesn't this break

  yes | ./guix-install.sh

because now it doesn't wait for the newline?

--Sig_/oUVX8aZjqUTWkpSTXnXMX9q
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvhe9AACgkQ5xo1VCww
uqUlEwf7Bh3xH8CCksNYsisj/RijvmYVfm6WprbIuBUWctJzOYyW4cvHg+QBjKWQ
6a3NDhv9lanxVFnSmfOWF+mRfT0FQzNl1LaEhMSyu5aeQuLs6Ikl7uPvk5Mgr890
Q/5SSA7Io+4zZNt4KWs8Vdg69bkJAqt/mXRiW7oK+u3UefVeTHHvEZ8aOKh+UFh9
C0JDhQl+JbrwHCWujccM75gRl3NEH9FDqlCVlnmxDCJLf+utvga/K4DXLIsl2UE2
wvTco8Z0g2vRjKx/Eb5WioUIZTJsEEy/n53AOC8XXG3zUOb6VXzhctK6WEc27CAv
lb1jOYVpDLi9rWy4X60q+8BsA5UpsA==
=doGH
-----END PGP SIGNATURE-----

--Sig_/oUVX8aZjqUTWkpSTXnXMX9q--




Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 6 Nov 2018 11:31:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 06 06:31:16 2018
Received: from localhost ([127.0.0.1]:36081 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gJzZk-0001B5-Ai
	for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 06:31:16 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:37432)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1gJzZg-0001Av-VT
 for 33134 <at> debbugs.gnu.org; Tue, 06 Nov 2018 06:31:15 -0500
Received: from localhost (178.113.175.117.wireless.dyn.drei.com
 [178.113.175.117])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 11025336038A;
 Tue,  6 Nov 2018 12:31:11 +0100 (CET)
Date: Tue, 6 Nov 2018 12:31:08 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: rsiddharth <s@HIDDEN>
Subject: Re: [bug#33134] [PATCH 5/5] guix-install.sh: Update
 sys_authorize_build_farms.
Message-ID: <20181106123108.11c0c8ab@HIDDEN>
In-Reply-To: <20181103011138.66825-1-s@HIDDEN>
References: <20181024115443.GA1297@macbook41>
 <20181103011138.66825-1-s@HIDDEN>
X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/LcL8t0lUfRxuFW4ocSWttI+"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33134
Cc: 33134 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/LcL8t0lUfRxuFW4ocSWttI+
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

On Fri,  2 Nov 2018 21:11:38 -0400
rsiddharth <s@HIDDEN> wrote:

> -            *) _msg "Please answer yes or no.";
> +            *) _msg "Please answer yes or no."; yn=3D""

Does this make it conditionally interactive?  Would it be better to "exit 1=
" here?

--Sig_/LcL8t0lUfRxuFW4ocSWttI+
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvhe3wACgkQ5xo1VCww
uqVrbwgAhtKSatqs5hgPH96KKUGTbiR/2qB4iD2RaBRMMDm23lxiCkiAHRBd2lne
UY+Px76FQdi4ivfx3kxSJcz0/rlbWCXLblgAVgMtAnygTUv9SxbpgJ/lqvqMLuS7
PJCE2JKcgV7mU8ClaYrhnRX1WHTvTsPjhP2Nl7A8Cg9ZBYAnwmZeVa864HVoeYuG
ATCy1kr90rg+xXQFerx4XUm6486jcCv1IgqhCS2YNh3M7V0ryockdvRD9WWf74Zl
UH8MmQeqYfOLS7CU6QlaeZqqJaMaXMCmPyMN9HRM5UY1m6jZiLEOl3gy5FkbNlzy
ndCMRxU+gkZPiUemyxcW3Yo6R5feng==
=wCP7
-----END PGP SIGNATURE-----

--Sig_/LcL8t0lUfRxuFW4ocSWttI+--




Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 6 Nov 2018 11:28:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 06 06:28:34 2018
Received: from localhost ([127.0.0.1]:36077 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gJzX7-00015g-UT
	for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 06:28:34 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:37230)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1gJzX6-00015W-Fc
 for 33134 <at> debbugs.gnu.org; Tue, 06 Nov 2018 06:28:33 -0500
Received: from localhost (178.113.175.117.wireless.dyn.drei.com
 [178.113.175.117])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 922E2336038A;
 Tue,  6 Nov 2018 12:28:31 +0100 (CET)
Date: Tue, 6 Nov 2018 12:28:29 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: rsiddharth <s@HIDDEN>
Subject: Re: [bug#33134] [PATCH 3/5] guix-install.sh: Update main.
Message-ID: <20181106122829.5caa1a77@HIDDEN>
In-Reply-To: <20181103011057.39591-1-s@HIDDEN>
References: <20181024115443.GA1297@macbook41>
 <20181103011057.39591-1-s@HIDDEN>
X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/9Hy4q4bLT2Igl9n+9.I/2_E"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33134
Cc: 33134 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/9Hy4q4bLT2Igl9n+9.I/2_E
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Fri,  2 Nov 2018 21:10:57 -0400
rsiddharth <s@HIDDEN> wrote:

> * etc/guix-install.sh (main): Call parse_args.
> ---
>  etc/guix-install.sh | 2 ++
>  1 file changed, 2 insertions(+)
>=20
> diff --git a/etc/guix-install.sh b/etc/guix-install.sh
> index d16f8ac59..c817b6dd8 100755
> --- a/etc/guix-install.sh
> +++ b/etc/guix-install.sh
> @@ -418,6 +418,8 @@ EOF
> =20
>  main()
>  {
> +    parse_args $@
> +

Should be

   "$@"

with quotes

--Sig_/9Hy4q4bLT2Igl9n+9.I/2_E
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvhet0ACgkQ5xo1VCww
uqXu4ggAj74PEW6NtXCCy7qIlO4sR8zXtp9YuVIiXN3QyTccPK3huPerZX9xOYyR
h+GG8tM/lx6DhK6ov8WnLmW5NoovFP8Dh0CoK8ZsuZVNax/A/IwRN9lCijxQw+fL
3zSvJ691l6kr0QI3RykkmdSlrQ18YJK5E7qWpOi4s37pgkUVh2vYYqWikHh42JuV
6FgD6yibNXebT5g1DpBmzuWIHJ5blfyaPRjFdIsLfUC2ucXkgxDhjH5H0gk7Z2Vy
mcQx8d7JJeF5W52QA3k33jhmiSnvID1Sb8v0cUjtPEmUZDlX/YCjNxuiiYXUIgdU
Pf5v+crEHtaLVzhhepBW6EOiVVsc6Q==
=adxx
-----END PGP SIGNATURE-----

--Sig_/9Hy4q4bLT2Igl9n+9.I/2_E--




Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 6 Nov 2018 11:27:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 06 06:27:57 2018
Received: from localhost ([127.0.0.1]:36073 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gJzWX-00014Q-JK
	for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 06:27:57 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:37168)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1gJzWV-00014G-M3
 for 33134 <at> debbugs.gnu.org; Tue, 06 Nov 2018 06:27:55 -0500
Received: from localhost (178.113.175.117.wireless.dyn.drei.com
 [178.113.175.117])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 8A7383361682;
 Tue,  6 Nov 2018 12:27:54 +0100 (CET)
Date: Tue, 6 Nov 2018 12:27:52 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: rsiddharth <s@HIDDEN>
Subject: Re: [bug#33134] [PATCH 2/5] guix-install.sh: Add parse_args.
Message-ID: <20181106122752.49e1b484@HIDDEN>
In-Reply-To: <20181103011048.73864-1-s@HIDDEN>
References: <20181024115443.GA1297@macbook41>
 <20181103011048.73864-1-s@HIDDEN>
X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/FA=tDjxk83+.l9p0+XbmEV="; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33134
Cc: 33134 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/FA=tDjxk83+.l9p0+XbmEV=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

> +    # process -y / -n arg.
> +    export AUTO_YN=3D${1:1:1}
> +    if [ -z $AUTO_YN ]; then
> +        export AUTO_YN=3D""
> +    fi

Why "export" ? Now all the child processes get it, making their environment
different from before.  This makes parse_args have system-wide side effects.

If we wanted to export it, we could do it explicitly after parse_args has
been called.

--Sig_/FA=tDjxk83+.l9p0+XbmEV=
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvhergACgkQ5xo1VCww
uqUMDQgAid1V29fSxjaopH8+CyOwBheq0XEJzqk0HAhVMg7gvky7fCkeet0DX3BX
COHyxsbauEdoRNzsfW7omBBpEZw0gejrqYhMLlnfcxFZX+1WJQNfDh4PzFepbxpn
faBWF6mCz66cdwDivdE0zNmeJWjJ7bRP+B4NzjaD7cAaiilLKE9MJcHEajTEXxs2
8eKrC1LYUzO6e/QmM0K7UuS1oCzAgzkNcmQ0ZIOF0LDWZHwuDznbbvU+5tHaEwrN
WGFyZvockvzoSqAVOZeE0RqaPtgqJ4ztCw7gIc35PhuiLIHSTh8FZBnZ56IozkFj
9FEL4LVi709SQ3cDO9zklt7YECe2pA==
=7Yav
-----END PGP SIGNATURE-----

--Sig_/FA=tDjxk83+.l9p0+XbmEV=--




Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 3 Nov 2018 01:11:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 02 21:11:43 2018
Received: from localhost ([127.0.0.1]:60496 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gIkTX-0002kX-L0
	for submit <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:11:43 -0400
Received: from lyra.ricketyspace.net ([159.89.229.91]:36078)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gIkTW-0002kP-1y
 for 33134 <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:11:42 -0400
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541207501;
 bh=iN648lBwsWcHEARR7sbf/ZsnBDcV7NH7UsF26/l5M08=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=3tWM9tZuuRNKUHVGr3UBKalQuymo3AUzM7gk1qtcaKD9ZCiLpGrb24paUcr22i36/
 imoN6e602SQ6CEgWS7c6nrYM5orlt1mknNN6WOAwOkhZuzugLe+dz7wp6xjJJBIqW8
 sUYxW7ty6JWA/9EAcHopAgzSJe+r0D7Bl8w7Oa1/VsihaVfpxZHxDtuqfJYFzJsd6G
 hS/b8DFNeMpj80tXj8iDdt70s8VmmmH1vD4do78bALCMPhi+b6pjWy8dYEV3hHZsBW
 6pSfqgafvdgE/gRoPtaUwmfozbI0C4as6SuXh58K1CUsTC2ueKziTlhAhQv38XB9y/
 k1NbAsfOW5Zlw==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 5/5] guix-install.sh: Update sys_authorize_build_farms.
Date: Fri,  2 Nov 2018 21:11:38 -0400
Message-Id: <20181103011138.66825-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181024115443.GA1297@macbook41>
References: <20181024115443.GA1297@macbook41>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (sys_authorize_build_farms): Don't prompt
if AUTO_YN is set.
---
 etc/guix-install.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 9bf52db41..18adc17a2 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -355,8 +355,11 @@ sys_enable_guix_daemon()
 
 sys_authorize_build_farms()
 { # authorize the public keys of the two build farms
+    local yn=$AUTO_YN
+
     while true; do
-        read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn
+        [[ -n $yn ]] || read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn
+
         case $yn in
             [Yy]*) guix archive --authorize < "${ROOT_HOME}/.guix-profile/share/guix/hydra.gnu.org.pub" &&
                          _msg "${PAS}Authorized public key for hydra.gnu.org";
@@ -365,7 +368,7 @@ sys_authorize_build_farms()
                    break;;
             [Nn]*) _msg "${INF}Skipped authorizing build farm public keys"
                    break;;
-            *) _msg "Please answer yes or no.";
+            *) _msg "Please answer yes or no."; yn=""
         esac
     done
 }
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 3 Nov 2018 01:11:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 02 21:11:33 2018
Received: from localhost ([127.0.0.1]:60492 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gIkTN-0002k9-3k
	for submit <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:11:33 -0400
Received: from lyra.ricketyspace.net ([159.89.229.91]:36074)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gIkTL-0002k2-3P
 for 33134 <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:11:31 -0400
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541207491;
 bh=p7KF+WvJWZIl6sf4FbnUXuzOCuYc+hQB0Ds7AdbtGT0=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=3b94/1ysyDtro+8RidBjClWqGKIQWW8JjZV+PfxpNk7MaKHpLwaG4N7aVChxZpcoi
 vWBSpwu5I/qp+cb5vsCHk3nTrj61zGMC7tIwV9qwmdv8sUYu55Nntzl1weOAayC09r
 BB82DntAu1FvsZ/ANP+tB3+NL6eyyHzJfymOf/2PYkB4rWXE2jwHhJ5urh8cKcMgQn
 3C7QBPAuEqaEXfqp3OenLQsadM8uDVJJ7xptRjeA26NU1TXju6j/dIt/5JiwubG+3m
 fRTXV/Ac4ILAYDUuOAwdSaIB3tG3Ra2B9jTpyN8wSAv6/7laAR0hwS/sgZeJd2xGwo
 v+Zm5ciXZN8SQ==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 4/5] guix-install.sh: Update welcome.
Date: Fri,  2 Nov 2018 21:11:20 -0400
Message-Id: <20181103011120.27789-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181024115443.GA1297@macbook41>
References: <20181024115443.GA1297@macbook41>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (welcome): Don't prompt if AUTO_YN is set.
---
 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index c817b6dd8..9bf52db41 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -413,7 +413,7 @@ This script installs GNU Guix on your system
 https://www.gnu.org/software/guix/
 EOF
     echo -n "Press return to continue..."
-    read -N 1 -r  ANSWER
+    [[ -n $AUTO_YN ]] || read -N 1 -r  ANSWER
 }
 
 main()
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 3 Nov 2018 01:11:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 02 21:11:06 2018
Received: from localhost ([127.0.0.1]:60488 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gIkSv-0002jS-S6
	for submit <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:11:06 -0400
Received: from lyra.ricketyspace.net ([159.89.229.91]:36068)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gIkSt-0002j5-VT
 for 33134 <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:11:04 -0400
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541207463;
 bh=bii1+G4OdjHD4CsWMJ20Kgd6uenwgycyEOakev9LGTk=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=idxVDC8kB2ZMNVRIhhN+XMdAbFhIUOqjCYJQWBQ2zWzsIyqpcZ0Bkbnbrs/h2UV/B
 HTv1fpnNrplkTcfQJVKEwu5fu17R9prcrX+6InluUah/OE7uA2AVV3Xkwvr4XRHhbX
 0vd1dD38CPjQ+5XF2jullbdaXAGeYacBd4kKhWQfAHm8I60Hyd6DIhj7KV21WrFTAK
 8H4lBJW9uIXF0mM+Byzg6lBqB6lgxUZgYPETCmeJfjzDP1RshSDc7WROfPFaNRBWg1
 rBG+S79KHN09wOBdyBk90UXeKKqMXAczptPPiTIDl+NAkIVCX1pc8iR/mt+BJ1Zpkj
 kI7pM/1n7Q/2A==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 3/5] guix-install.sh: Update main.
Date: Fri,  2 Nov 2018 21:10:57 -0400
Message-Id: <20181103011057.39591-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181024115443.GA1297@macbook41>
References: <20181024115443.GA1297@macbook41>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (main): Call parse_args.
---
 etc/guix-install.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index d16f8ac59..c817b6dd8 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -418,6 +418,8 @@ EOF
 
 main()
 {
+    parse_args $@
+
     local tmp_path
     welcome
 
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 3 Nov 2018 01:10:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 02 21:10:55 2018
Received: from localhost ([127.0.0.1]:60481 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gIkSl-0002iT-Im
	for submit <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:10:55 -0400
Received: from lyra.ricketyspace.net ([159.89.229.91]:36064)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gIkSi-0002iK-8N
 for 33134 <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:10:52 -0400
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541207451;
 bh=pfuTxEe2vTmrh8+vRfGeb9brJ8yFl3+7e0XOoq2kgy8=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=4wCP+GBOhEWnuDqaaHW6x9X+NzPGI0nQdeWdSz87/odm/oMRXpdPeqP6zZIPpkiqK
 TgO8TG2B+Ro8HPL4sOgDfP6OdCd0lgQmfUvNEHa+p0elFjxtVb+rbSvAvnPY39u9DJ
 8J7bf/Y8RWHuLYlMy+Z0RXOd/9eWIXqUj6JMAMSU7GPf+xjmDtuxXiqrSacmNoZKrx
 yNbRjr85izF7qjDUgLRxS7ZjiDk7F9lHrGNjcUIU0VostdhdmI+uoY2k05IC1ZUciY
 OtKF7O2clAiGa/+iOFfMtORgAH/PSb6Pst5TAP7kElxjvf/y8ScTtXR5xF4DOHtt72
 W0lcbDVKYORFg==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 2/5] guix-install.sh: Add parse_args.
Date: Fri,  2 Nov 2018 21:10:48 -0400
Message-Id: <20181103011048.73864-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181024115443.GA1297@macbook41>
References: <20181024115443.GA1297@macbook41>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (parse_args): New function.
---
 etc/guix-install.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index cf839c20e..d16f8ac59 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -370,6 +370,21 @@ sys_authorize_build_farms()
     done
 }
 
+parse_args()
+{
+    local args_num=$#
+
+    if [ $args_num -lt 1 ]; then
+        return
+    fi
+
+    # process -y / -n arg.
+    export AUTO_YN=${1:1:1}
+    if [ -z $AUTO_YN ]; then
+        export AUTO_YN=""
+    fi
+}
+
 welcome()
 {
     cat<<"EOF"
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 3 Nov 2018 01:10:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 02 21:10:44 2018
Received: from localhost ([127.0.0.1]:60477 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gIkSZ-0002i4-Is
	for submit <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:10:44 -0400
Received: from lyra.ricketyspace.net ([159.89.229.91]:36060)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gIkSX-0002hx-V2
 for 33134 <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:10:42 -0400
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541207441;
 bh=Ns3yhA56ZXeoEp2jRJyS8BjJpO7IqNldwFI4chSQgbM=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=WOnN7utmjEhU5v9Q1TGQgfQ/Dwj3nKSJNrJVQJFCl7Kj0c/N7j1ZzFECUO34JlNM6
 /O6A+V049n9+pjJLMNwIsxqgZ+bDbtWqCw+w9fdY3c1tqZ2OblEk619XTRR3Sutssz
 f+ErZx2H7VeROi8lyk6L7na8wCcIrgM9Yuk19ZeegSlQjS31P0uySXeIo/kLy6dbK/
 FfQfpEmlJPRnZO4saKVm7jIYny6qBDqfaOV43Ph+zVWZdidlnMnpk0sulWqJJzxssS
 2W65fZuL5g/QA+raQvHWMBf/7G15d2xt1SWPWlEt6CsNWoZAlzY2mzfaBGJKveQzgO
 lEeQBJcIsw6XQ==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 1/5] guix-install.sh: Update welcome.
Date: Fri,  2 Nov 2018 21:10:34 -0400
Message-Id: <20181103011034.70086-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181024115443.GA1297@macbook41>
References: <20181024115443.GA1297@macbook41>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (welcome): Read exactly one character from input.
---
 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index ca6874ba0..cf839c20e 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -398,7 +398,7 @@ This script installs GNU Guix on your system
 https://www.gnu.org/software/guix/
 EOF
     echo -n "Press return to continue..."
-    read -r  ANSWER
+    read -N 1 -r  ANSWER
 }
 
 main()
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 3 Nov 2018 01:10:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 02 21:10:29 2018
Received: from localhost ([127.0.0.1]:60473 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gIkSL-0002hd-AU
	for submit <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:10:29 -0400
Received: from lyra.ricketyspace.net ([159.89.229.91]:36056)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gIkSK-0002hW-4b
 for 33134 <at> debbugs.gnu.org; Fri, 02 Nov 2018 21:10:28 -0400
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1541207427;
 bh=+WOpsvi3+xtw4cXejc9daArRWvggwZJsJmC4UuTzff4=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=E1CGb6IU8PL0WvSmHw2dRFuxm6ean6A9P8aSaBkWLc6l0yDAJzZJTi7hO/NJe9u2s
 mVTL45iUuV9TntyxR+mA9aD3W9iBVdYr4OMtjI1JkPPEh7y4irtkLTfuvkBgQ6a3Gq
 q6XwJJGthp0PDJqpZa5Oa5RMspy0iQXvq+un2hZHCWrwQNIEUMYUBd4aE7bt7xIXNX
 ccs7Y3WW0zfFOj3RiAN1NQC97LdhqOrzL+Y0kayQVUH5LATzwR+GtHERu7qBexv4Lo
 nD2k4lr7uQdAgLOuHYnnZu0tcq6Eows/SRkwkrxjRn0AcUpRBXudIp1w3gZg8k01IQ
 PgMn4+UjifaZA==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 0/5] Add auto yes/no switch to guix-install.sh
Date: Fri,  2 Nov 2018 21:10:19 -0400
Message-Id: <20181103011019.87844-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181024115443.GA1297@macbook41>
References: <20181024115443.GA1297@macbook41>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

The following patch series adds "auto yes/no" switch to the guix-install.sh
script.

It works like this:

   guix-install.sh -y

   [ for non-interactively answering 'yes' to all y/n prompts ]

   guix-install.sh -n

   [ for non-interactively answering 'no' to all y/n prompts ]

   If either the -y or the -n switch is provided, the script will skip the
   "Press return to continue..." prompt.

I'm not a bash expert; if there is a better way to do this, let me know. I
would be happy to refactor and send a fresh patch series.

rsiddharth (5):
  guix-install.sh: Update welcome.
  guix-install.sh: Add parse_args.
  guix-install.sh: Update main.
  guix-install.sh: Update welcome.
  guix-install.sh: Update sys_authorize_build_farms.

 etc/guix-install.sh | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 24 Oct 2018 13:28:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 24 09:28:01 2018
Received: from localhost ([127.0.0.1]:39222 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gFJCb-0000v8-5S
	for submit <at> debbugs.gnu.org; Wed, 24 Oct 2018 09:28:01 -0400
Received: from flashner.co.il ([178.62.234.194]:51012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1gFJCY-0000ut-SE
 for 33134 <at> debbugs.gnu.org; Wed, 24 Oct 2018 09:27:59 -0400
Received: from localhost (unknown [141.226.14.143])
 by flashner.co.il (Postfix) with ESMTPSA id D63604002A;
 Wed, 24 Oct 2018 13:27:52 +0000 (UTC)
Date: Wed, 24 Oct 2018 16:27:51 +0300
From: Efraim Flashner <efraim@HIDDEN>
To: Tobias Geerinckx-Rice <me@HIDDEN>
Subject: Re: [bug#33134] [PATCH 0/1] guix-install.sh: Add ability to run it
 non-interactively.
Message-ID: <20181024132751.GC1297@macbook41>
References: <20181024001542.16368-1-s@HIDDEN>
 <20181024115443.GA1297@macbook41> <87k1m7scjw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="zCKi3GIZzVBPywwA"
Content-Disposition: inline
In-Reply-To: <87k1m7scjw.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: 33134 <at> debbugs.gnu.org, rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--zCKi3GIZzVBPywwA
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 24, 2018 at 03:24:03PM +0200, Tobias Geerinckx-Rice wrote:
> rsiddharth, Efraim,
>=20
> Efraim Flashner wrote:
> > On Tue, Oct 23, 2018 at 08:15:42PM -0400, rsiddharth wrote:
> > > I want to be able to run the guix-install.sh non-interactively[1]
> > > like this:
> > >=20
> > >    echo "yy" | guix-install.sh
> > >=20
> > >    (One "y" for "Press return to continue..." prompt, the other
> > > "y" for
> > >    "Permit downloading pre-built package binaries from the
> > > project's build
> > >    farms? (yes/no)" prompt).
> > >=20
> > > Currently, the `read` in welcome function reads both the "y". I
> > > updated it to
> > > read just one character.
> > >=20
> >=20
> > would this work? echo "y\ny" | guix-install.sh
>=20
> Not quite, but
>=20
>  $ echo -e "y\ny" | guix-install.sh
>=20
> will. Or the more conventional
>=20
>  $ yes | guix-install.sh # untested
>=20
> providing guix-install.sh doesn't choke on that infinite stream of "y"s.
> Which it might, and even if it doesn't now, there's no guarantee that this
> dirty hack won't break the future.

This actually made me snort. "Alright! I get it! You really want it!"

>=20
> If this is something we want to support, it could be done more better
> through a '--non-interactive' or '--force' flag that skips these and any
> future prompts at the source.
>=20
> Non?
>=20
> T G-R

This is actually something I was thinking of a while ago. I use github
as a mirror, and I definately wouldn't be against using their CI system
to install guix, 'guix pull', 'guix build -f guix.scm'.

--=20
Efraim Flashner   <efraim@HIDDEN>   =D7=90=D7=A4=D7=A8=D7=99=D7=9D =
=D7=A4=D7=9C=D7=A9=D7=A0=D7=A8
GPG key =3D A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--zCKi3GIZzVBPywwA
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlvQc1MACgkQQarn3Mo9
g1EhyA//WETs1uCC/xD2OZT4UvT54r6VEVCQ6hoL49WJdyUHDOD1Euuy5ndUFATV
9NQGIpvDCF3+Bt7rYznaIeIdng9MjQKqzDEo4fNMGxsR5qSP3nPgvYDoCKgsfGGd
MGCdcECWtCs+i11sXTzE6u/Dl+h8h2tP+t7f3RyFTVR0/u/VhABTvKpYLwcnqeWs
C1qygFl0JcCUgK7roKGpT5/a8f8eZKSUOpDTjmgNOIHyYc+mw5fL5iE7OVJTncin
Z+RZ4mB+M/mnsZHUdkaVet/L6KlfBTXb8OvJXhyiryRArFJ1pyqC6edpBBDR13Pi
SlEkUQOa5ZV0Si80N4e1DKiP3Mx60SJjMWA9RfDxH1aKa9uQyvFmSUSwSS3ixkyT
5ZDTFqHNUqeDc07jwKulgeyuZmshN7WE0XPjVgm4PlhilGlpTsTc6jd0oJbE1abj
YgJe166LXOsYIuGIUrh+w1XqSp0PutX9zoFGHIXMi+ZeAd4SoOGmmx16zEvVwkUq
1gklV8PCHHzVnbrGTlL8IqwjekexlBbMkXaJ+ga3YqDQjGZxLodJTFyarmusicoI
prsWpHyRLa2h6iS4RKWJ91OyjWDRj+DAJshqUVX2lWs2HGNEycsAQDastXoxe1Rs
GwcHD2joaGcQVbkc3Ljt1fLLlX/tMpxQAk1pZQIb9Dzb+8fcRVo=
=60Fz
-----END PGP SIGNATURE-----

--zCKi3GIZzVBPywwA--




Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 24 Oct 2018 13:24:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 24 09:24:06 2018
Received: from localhost ([127.0.0.1]:39217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gFJ8o-0000qC-KV
	for submit <at> debbugs.gnu.org; Wed, 24 Oct 2018 09:24:06 -0400
Received: from tobias.gr ([80.241.217.52]:48616)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1gFJ8m-0000q3-Gx
 for 33134 <at> debbugs.gnu.org; Wed, 24 Oct 2018 09:24:05 -0400
Received: by tobias.gr (OpenSMTPD) with ESMTP id 1b58d6d0;
 Wed, 24 Oct 2018 13:24:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=references
 :from:to:cc:subject:in-reply-to:date:message-id:mime-version
 :content-type; s=2018; i=me@HIDDEN; bh=V862jEQeLUMKmpvtXdJKED
 5g+CccTxCe6efUfybcx48=; b=jm2wPriTukpTbeUzzc02NRQFg9dS9IadFibqNn
 l4drWiigJcJjNGWS9bu7N47xqeiLD56mhg5uKjeA2g0XBlLl6rZE+2W/iG61f5Tv
 OHlWzKAJpcK8RFnu4a60+dHjh9kWE5yHNpyW2bmBUlRcKFOM3p3iK7Y6QW4ckf7r
 7AntGn/VOIYVKRIO9ylKUxbfDf0plZ7Suf03PjoNxa/u0y0saagUlUIwdHVjgy08
 T4d626Hq/R+oXRYVkPQgvvkm4x5uqLEq4s7UDYSYjnGn/xWJYHXV/SQlTdQ1SNha
 nfwjOexqYDCqkOFWnN4Bwf6XX3cW3QFObzGI+N81efkjSbfw==
Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 8d78a2cd
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Wed, 24 Oct 2018 13:24:00 +0000 (UTC)
References: <20181024001542.16368-1-s@HIDDEN>
 <20181024115443.GA1297@macbook41>
From: Tobias Geerinckx-Rice <me@HIDDEN>
To: Efraim Flashner <efraim@HIDDEN>
Subject: Re: [bug#33134] [PATCH 0/1] guix-install.sh: Add ability to run it
 non-interactively.
In-reply-to: <20181024115443.GA1297@macbook41>
Date: Wed, 24 Oct 2018 15:24:03 +0200
Message-ID: <87k1m7scjw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: 33134 <at> debbugs.gnu.org, rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

rsiddharth, Efraim,

Efraim Flashner wrote:
> On Tue, Oct 23, 2018 at 08:15:42PM -0400, rsiddharth wrote:
>> I want to be able to run the guix-install.sh 
>> non-interactively[1] like this:
>> 
>>    echo "yy" | guix-install.sh
>> 
>>    (One "y" for "Press return to continue..." prompt, the other 
>>    "y" for
>>    "Permit downloading pre-built package binaries from the 
>>    project's build
>>    farms? (yes/no)" prompt).
>> 
>> Currently, the `read` in welcome function reads both the "y". I 
>> updated it to
>> read just one character.
>> 
>
> would this work? echo "y\ny" | guix-install.sh

Not quite, but

  $ echo -e "y\ny" | guix-install.sh

will. Or the more conventional

  $ yes | guix-install.sh # untested

providing guix-install.sh doesn't choke on that infinite stream of 
"y"s. Which it might, and even if it doesn't now, there's no 
guarantee that this dirty hack won't break the future.

If this is something we want to support, it could be done more 
better through a '--non-interactive' or '--force' flag that skips 
these and any future prompts at the source.

Non?

T G-R




Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 24 Oct 2018 11:54:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 24 07:54:52 2018
Received: from localhost ([127.0.0.1]:39175 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gFHkS-0007DG-K9
	for submit <at> debbugs.gnu.org; Wed, 24 Oct 2018 07:54:52 -0400
Received: from flashner.co.il ([178.62.234.194]:50744)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1gFHkQ-0007D0-JC
 for 33134 <at> debbugs.gnu.org; Wed, 24 Oct 2018 07:54:50 -0400
Received: from localhost (unknown [141.226.14.143])
 by flashner.co.il (Postfix) with ESMTPSA id D3E2840090;
 Wed, 24 Oct 2018 11:54:44 +0000 (UTC)
Date: Wed, 24 Oct 2018 14:54:43 +0300
From: Efraim Flashner <efraim@HIDDEN>
To: rsiddharth <s@HIDDEN>
Subject: Re: [bug#33134] [PATCH 0/1] guix-install.sh: Add ability to run it
 non-interactively.
Message-ID: <20181024115443.GA1297@macbook41>
References: <20181024001542.16368-1-s@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr"
Content-Disposition: inline
In-Reply-To: <20181024001542.16368-1-s@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: 33134 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--liOOAslEiF7prFVr
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 23, 2018 at 08:15:42PM -0400, rsiddharth wrote:
> I want to be able to run the guix-install.sh non-interactively[1] like th=
is:
>=20
>    echo "yy" | guix-install.sh
>=20
>    (One "y" for "Press return to continue..." prompt, the other "y" for
>    "Permit downloading pre-built package binaries from the project's build
>    farms? (yes/no)" prompt).
>=20
> Currently, the `read` in welcome function reads both the "y". I updated i=
t to
> read just one character.
>=20

would this work? echo "y\ny" | guix-install.sh

--=20
Efraim Flashner   <efraim@HIDDEN>   =D7=90=D7=A4=D7=A8=D7=99=D7=9D =
=D7=A4=D7=9C=D7=A9=D7=A0=D7=A8
GPG key =3D A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--liOOAslEiF7prFVr
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlvQXYAACgkQQarn3Mo9
g1ERpQ/9F2wjf/L5rHYeLBqQi/nvnAM1tgDavb4zCtx4yMbiZ4yVrx9LLaBf+qaL
lsgG26Dx/DA5BXfTyYibLXpIEIVD71lb2E7H+ElUnhO/YQ+99qerjlZPCPZbkMpZ
kLzwfO4Ydf5e+5m2kltO/VZ2+AHh8VG2nU+57zNUPPqaiNk2KNzVx2g4NdX+U1k3
9Zf74EvkwwV6Nby7pXfTMbT57184gJ5QYOSlaA+WNn94FTYTNBlklJrBqclQugLE
Wir8uhw/OXaAFuIZAidRPVSByvHT6QxN0qLmpfon3d8CO+3wgHpRINRF3TltkC0/
H2NRy1lI2TGJ2ViPdKH2KKGo6q+FehXYHgNMMpAntyH3hWuIPn6aTy9j/wKONYPg
k8DqpLIIrOg7jBgHIs0nbLr/hpIDZhKGpdy4l3Fj5qVCHpPp+Xne9Z2IeY4H6fkn
V5vrUT1XELRsDRyyBadMypnOuWhtsw/Q9w2xCVjSOfg2iOoAU3YhGr4DsBARvoXd
AUEFPmnvwPmMUYfv0L5Vvc6uaQqRc+gmbmC8F+zZNyk6JSo4CVLa6KAYsNCeHs3b
ZH9DtytzgVBH3ZdZOBsHiGPSL3yxUVj/FX9yJA9XD4nqUWMhUvtUQTpnq8fEuXbm
3inHG9hyB2Vtp8fWNgk3vMMa2BGjS7mw8OaUAL7LMqaeQBaGMTs=
=5/YS
-----END PGP SIGNATURE-----

--liOOAslEiF7prFVr--




Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at 33134 <at> debbugs.gnu.org:


Received: (at 33134) by debbugs.gnu.org; 24 Oct 2018 00:21:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 23 20:21:26 2018
Received: from localhost ([127.0.0.1]:38941 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gF6vN-0005H4-RA
	for submit <at> debbugs.gnu.org; Tue, 23 Oct 2018 20:21:26 -0400
Received: from lyra.ricketyspace.net ([159.89.229.91]:48728)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gF6vM-0005Gx-Gd
 for 33134 <at> debbugs.gnu.org; Tue, 23 Oct 2018 20:21:24 -0400
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1540340484;
 bh=Ns3yhA56ZXeoEp2jRJyS8BjJpO7IqNldwFI4chSQgbM=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=P2KFOgfBQxFBhdRke181Wumo75wkXF559WdWSHly3WtSLqj4W/Rrqy/9YWZfgI2iN
 VpvoAnAzDtSzrQ6kOYBFrArxcZ3gkwOXzK0yFKVtrx/LDBGK7wYa61leHDnxgAaf/D
 lhUkWNDF02VTG6ykB0vWdHlmSnahohCBLD3sHiHd1tdUuwHvJX8Vzi3300+0/dni/y
 2vB1zjq+FHSOhpOZO5HU0iam+Swd0gVy5yT8L0PCGvMF5CdKP66UZta6Z6KD3DEHwH
 YWMKpsdyh68nGn+IUPkJ2kZ1foMO6o0JJkI+XjZw9cQV+Nx6hBlU4GgnplWkXIHHVI
 9Wj20mz5OKqeQ==
To: 33134 <at> debbugs.gnu.org
Subject: [PATCH 1/1] guix-install.sh: Update welcome.
Date: Tue, 23 Oct 2018 20:21:14 -0400
Message-Id: <20181024002114.46005-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
In-Reply-To: <20181024001542.16368-1-s@HIDDEN>
References: <20181024001542.16368-1-s@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33134
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* etc/guix-install.sh (welcome): Read exactly one character from input.
---
 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index ca6874ba0..cf839c20e 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -398,7 +398,7 @@ This script installs GNU Guix on your system
 https://www.gnu.org/software/guix/
 EOF
     echo -n "Press return to continue..."
-    read -r  ANSWER
+    read -N 1 -r  ANSWER
 }
 
 main()
-- 
2.19.1





Information forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Oct 2018 00:16:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 23 20:16:25 2018
Received: from localhost ([127.0.0.1]:38935 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gF6qX-00059e-4P
	for submit <at> debbugs.gnu.org; Tue, 23 Oct 2018 20:16:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59359)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <s@HIDDEN>) id 1gF6qS-00059N-KW
 for submit <at> debbugs.gnu.org; Tue, 23 Oct 2018 20:16:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <s@HIDDEN>) id 1gF6qJ-0003N4-Ay
 for submit <at> debbugs.gnu.org; Tue, 23 Oct 2018 20:16:15 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55703)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <s@HIDDEN>) id 1gF6qE-0003LT-L1
 for submit <at> debbugs.gnu.org; Tue, 23 Oct 2018 20:16:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40685)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <s@HIDDEN>) id 1gF6qD-00035S-I9
 for guix-patches@HIDDEN; Tue, 23 Oct 2018 20:16:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <s@HIDDEN>) id 1gF6q8-0003GO-9F
 for guix-patches@HIDDEN; Tue, 23 Oct 2018 20:16:03 -0400
Received: from lyra.ricketyspace.net ([159.89.229.91]:42750)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <s@HIDDEN>) id 1gF6q6-0003CJ-H3
 for guix-patches@HIDDEN; Tue, 23 Oct 2018 20:15:58 -0400
From: rsiddharth <s@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ricketyspace.net;
 s=mail; t=1540340152;
 bh=AcGXFDhBCOsOJANqniwTgdBm65qrWUkK+PTk0QDU3sQ=;
 h=From:To:Cc:Subject:Date:From;
 b=NP3Q4f/j7xcYPjHLlArTD0o6SKXzhokSuiiiINOfOohnrP5oHJl0SAfwDkkCs/k56
 098wmX57EWpI87WQ/LhY+SejH5PERkqlOHLjAoQXYDk3ZAlOCXGguOT1njELV+9jnO
 rhmwH3+Xe1x0M9EExsMrn6BhBMxLl+UHa4WetyEmNWXbD77hvX4JjU8Vom5A+r4u6q
 +mvtg8mP4oCiIaZK8nkf5jjD67LRXZ5NnohE1DQYdMi7y3uv5Cr21ECQTHW7esJnOt
 b/f6EhfsaUeUTQv6/VgR1b5NBElt5f0FQ5eNbW9C+by+tWMgh8jDE5n6WkjCx64HcY
 2Tb/SGJQAmgQg==
To: guix-patches@HIDDEN
Subject: [PATCH 0/1] guix-install.sh: Add ability to run it non-interactively.
Date: Tue, 23 Oct 2018 20:15:42 -0400
Message-Id: <20181024001542.16368-1-s@HIDDEN>
X-Mailer: git-send-email 2.19.1
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
Cc: rsiddharth <s@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.1 (-----)

I want to be able to run the guix-install.sh non-interactively[1] like th=
is:

   echo "yy" | guix-install.sh

   (One "y" for "Press return to continue..." prompt, the other "y" for
   "Permit downloading pre-built package binaries from the project's buil=
d
   farms? (yes/no)" prompt).

Currently, the `read` in welcome function reads both the "y". I updated i=
t to
read just one character.

[1]: https://git.ricketyspace.net/propellor/tree/config.hs?id=3D0cddd47ef=
#n640

rsiddharth (1):
  guix-install.sh: Update welcome.

 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--=20
2.19.1





Acknowledgement sent to rsiddharth <s@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#33134; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.