From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH] services: herd: Fix matching ok responses and add stop service procedure Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Aug 2017 21:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27977@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150196842620166 (code B ref -1); Sat, 05 Aug 2017 21:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Aug 2017 21:27:06 +0000 Received: from localhost ([127.0.0.1]:43801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de6bB-0005FC-Mz for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:27:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de6b9-0005Eb-Gi for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:27:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1de6b3-00050I-Md for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:26:58 -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]:35714) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1de6b3-00050E-Jv for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:26:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1de6b2-0004JF-JP for guix-patches@gnu.org; Sat, 05 Aug 2017 17:26:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1de6ax-0004yJ-Lv for guix-patches@gnu.org; Sat, 05 Aug 2017 17:26:56 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:44959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1de6ax-0004y0-GG for guix-patches@gnu.org; Sat, 05 Aug 2017 17:26:51 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id C8540154C2E; Sat, 5 Aug 2017 22:26:48 +0100 (BST) Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id A9FB1154C2C for ; Sat, 5 Aug 2017 22:26:48 +0100 (BST) Date: Sat, 5 Aug 2017 22:26:46 +0100 From: Christopher Baines Message-ID: <20170805222646.149cb45a@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/hpha6wBzvNG4Hr.Ez/ktviH"; protocol="application/pgp-signature" 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.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --Sig_/hpha6wBzvNG4Hr.Ez/ktviH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Patches incoming... --Sig_/hpha6wBzvNG4Hr.Ez/ktviH Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlmGOBZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xc2xw//RsHZmm6t+lZ9TKY0tuVpWwOpYFHacTwF3STIEas/M1gouFEQOotE28J+ ZqDFMBADyEuggBuFdP/IBTyMMk9jD+qikkNDXCFc+5hmH7pmH6M0jJk+PGZTxL2j E2N6x6uMYlgtEYU8JU7AEHN5b73Ii7Jj4FZ8ONsk9+DTkSc7TjuWm/EDMJaxbsa3 8oYdsWuqb+iQ8QzqLsDwnw0Aj5jjtATnUDJNJyqx+s5DseevaBtZIsScM9TWLeg6 LrcjMOenGMQMZfRx+s2Tb56ZX/ie1ykQEBNufkGa0Utb2L8HoDqwXSgO8aF042ZO lUCImNDATXzJQWFPMgZQvRlr8K4u5TdnZrKJNSuNCCDoGmwp0OPp/2d2If0g0YzA HUQ1yECYp/hKNQw/3HJs41Vy+ZwElub1RCiVIOS+0emTNZqErM2Izrs1RmFD6PRU 8MCerdQJ0xYlr7nurZHs8om8GSIMxiawM8Dwb9iJN9AlpupscDLTNgcCApPaVx5U +qYaBuiPvhD1To7y9OhUyDPcVzHcgFFo0vQwPvSn41wT9LsXqkwbNLaROXfNADEA BuGZhxdQahruGblWWa+aOBfgZLIQSCU0K513YbgI/keaYzVS/uZnZ3aLtvXNCpDd Jihd5FRS1Fc7/boUcfhxLtbKz3IotEfZuGGnXXnovTUlWKU/id4= =pEE/ -----END PGP SIGNATURE----- --Sig_/hpha6wBzvNG4Hr.Ez/ktviH-- From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH 2/2] services: herd: Add a stop-service procedure. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Aug 2017 21:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27977@debbugs.gnu.org Received: via spool by 27977-submit@debbugs.gnu.org id=B27977.150196865020587 (code B ref 27977); Sat, 05 Aug 2017 21:31:01 +0000 Received: (at 27977) by debbugs.gnu.org; 5 Aug 2017 21:30:50 +0000 Received: from localhost ([127.0.0.1]:43808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de6eo-0005Ly-8k for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:30:50 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:58725 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de6el-0005Lj-VO for 27977@debbugs.gnu.org; Sat, 05 Aug 2017 17:30:48 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 6AAE5154C2C; Sat, 5 Aug 2017 22:30:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 4459A154C2E for <27977@debbugs.gnu.org>; Sat, 5 Aug 2017 22:30:36 +0100 (BST) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id e38ddeb6 for <27977@debbugs.gnu.org>; Sat, 5 Aug 2017 21:30:35 +0000 (UTC) From: Christopher Baines Date: Sat, 5 Aug 2017 22:30:34 +0100 Message-Id: <20170805213034.1012-2-mail@cbaines.net> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170805213034.1012-1-mail@cbaines.net> References: <20170805213034.1012-1-mail@cbaines.net> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/herd.scm (stop-service): New procedure. --- gnu/services/herd.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm index 49400aba4..e16d51b9d 100644 --- a/gnu/services/herd.scm +++ b/gnu/services/herd.scm @@ -49,7 +49,8 @@ unload-services unload-service load-services - start-service)) + start-service + stop-service)) ;;; Commentary: ;;; @@ -222,6 +223,10 @@ returns a shepherd object." (with-shepherd-action name ('start) result result)) +(define (stop-service name) + (with-shepherd-action name ('stop) result + result)) + ;; Local Variables: ;; eval: (put 'alist-let* 'scheme-indent-function 2) ;; eval: (put 'with-shepherd 'scheme-indent-function 1) -- 2.13.1 From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH 1/2] services: herd: Fix matching ok responses from shepherd service. References: <20170805222646.149cb45a@cbaines.net> In-Reply-To: <20170805222646.149cb45a@cbaines.net> Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Aug 2017 21:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27977@debbugs.gnu.org Received: via spool by 27977-submit@debbugs.gnu.org id=B27977.150196865020593 (code B ref 27977); Sat, 05 Aug 2017 21:31:02 +0000 Received: (at 27977) by debbugs.gnu.org; 5 Aug 2017 21:30:50 +0000 Received: from localhost ([127.0.0.1]:43810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de6eo-0005M0-F8 for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:30:50 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:58726 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de6em-0005Ll-Iy for 27977@debbugs.gnu.org; Sat, 05 Aug 2017 17:30:48 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 61C12154C2F; Sat, 5 Aug 2017 22:30:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 32DB7154C2C for <27977@debbugs.gnu.org>; Sat, 5 Aug 2017 22:30:36 +0100 (BST) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 8733e210 for <27977@debbugs.gnu.org>; Sat, 5 Aug 2017 21:30:34 +0000 (UTC) From: Christopher Baines Date: Sat, 5 Aug 2017 22:30:33 +0100 Message-Id: <20170805213034.1012-1-mail@cbaines.net> X-Mailer: git-send-email 2.13.1 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Previously the match expression case for a successful response (where error is #f) required that the result component contained a list with a single element. As far as I see when looking at the responses from the shepherd, this is not normally the case. Therefore, to avoid treating successful responses as errors, make the match requirement more permissive, accepting any value. * gnu/services/herd.scm (invoke-action): Change match condition for ok responses. --- gnu/services/herd.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm index f8d60a480..49400aba4 100644 --- a/gnu/services/herd.scm +++ b/gnu/services/herd.scm @@ -146,7 +146,7 @@ result. Otherwise return #f." (force-output sock) (match (read sock) - (('reply ('version 0 _ ...) ('result (result)) ('error #f) + (('reply ('version 0 _ ...) ('result result) ('error #f) ('messages messages)) (for-each display-message messages) (cont result)) -- 2.13.1 From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH 2/2] services: herd: Add a stop-service procedure. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Aug 2017 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 27977@debbugs.gnu.org Received: via spool by 27977-submit@debbugs.gnu.org id=B27977.150218005217025 (code B ref 27977); Tue, 08 Aug 2017 08:15:02 +0000 Received: (at 27977) by debbugs.gnu.org; 8 Aug 2017 08:14:12 +0000 Received: from localhost ([127.0.0.1]:51054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dezeW-0004QX-5B for submit@debbugs.gnu.org; Tue, 08 Aug 2017 04:14:12 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:34526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dezeU-0004QP-Id for 27977@debbugs.gnu.org; Tue, 08 Aug 2017 04:14:10 -0400 Received: from localhost (unknown [193.170.94.190]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 9344F1CA00D7; Tue, 8 Aug 2017 10:14:06 +0200 (CEST) Date: Tue, 8 Aug 2017 10:14:01 +0200 From: Danny Milosavljevic Message-ID: <20170808101401.036301f9@scratchpost.org> In-Reply-To: <20170805213034.1012-2-mail@cbaines.net> References: <20170805213034.1012-1-mail@cbaines.net> <20170805213034.1012-2-mail@cbaines.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) LGTM! From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH 1/2] services: herd: Fix matching ok responses from shepherd service. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Aug 2017 08:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 27977@debbugs.gnu.org Received: via spool by 27977-submit@debbugs.gnu.org id=B27977.150218021017301 (code B ref 27977); Tue, 08 Aug 2017 08:17:01 +0000 Received: (at 27977) by debbugs.gnu.org; 8 Aug 2017 08:16:50 +0000 Received: from localhost ([127.0.0.1]:51059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dezh4-0004Uz-Jl for submit@debbugs.gnu.org; Tue, 08 Aug 2017 04:16:50 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:40498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dezh2-0004Uq-Oe for 27977@debbugs.gnu.org; Tue, 08 Aug 2017 04:16:49 -0400 Received: from localhost (unknown [193.170.94.190]) by dd1012.kasserver.com (Postfix) with ESMTPSA id BF3221CA00D7; Tue, 8 Aug 2017 10:16:47 +0200 (CEST) Date: Tue, 8 Aug 2017 10:16:42 +0200 From: Danny Milosavljevic Message-ID: <20170808101642.7446f27f@scratchpost.org> In-Reply-To: <20170805213034.1012-1-mail@cbaines.net> References: <20170805222646.149cb45a@cbaines.net> <20170805213034.1012-1-mail@cbaines.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) LGTM! From unknown Fri Jun 13 10:57:05 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Christopher Baines Subject: bug#27977: closed (Re: [bug#27977] [PATCH 2/2] services: herd: Add a stop-service procedure.) Message-ID: References: <20170808205304.2e1e5ed0@cbaines.net> <20170805222646.149cb45a@cbaines.net> X-Gnu-PR-Message: they-closed 27977 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 27977@debbugs.gnu.org Date: Tue, 08 Aug 2017 19:54:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1502222042-31752-1" This is a multi-part message in MIME format... ------------=_1502222042-31752-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #27977: [PATCH] services: herd: Fix matching ok responses and add stop serv= ice procedure which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 27977@debbugs.gnu.org. --=20 27977: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D27977 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1502222042-31752-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 27977-done) by debbugs.gnu.org; 8 Aug 2017 19:53:10 +0000 Received: from localhost ([127.0.0.1]:52243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfAYv-0008Ey-V9 for submit@debbugs.gnu.org; Tue, 08 Aug 2017 15:53:10 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:48526 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfAYt-0008Eq-Tg for 27977-done@debbugs.gnu.org; Tue, 08 Aug 2017 15:53:08 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 0553D13E3BB; Tue, 8 Aug 2017 20:53:06 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id B849E13E3BA; Tue, 8 Aug 2017 20:53:05 +0100 (BST) Date: Tue, 8 Aug 2017 20:53:04 +0100 From: Christopher Baines To: Danny Milosavljevic Subject: Re: [bug#27977] [PATCH 2/2] services: herd: Add a stop-service procedure. Message-ID: <20170808205304.2e1e5ed0@cbaines.net> In-Reply-To: <20170808101401.036301f9@scratchpost.org> References: <20170805213034.1012-1-mail@cbaines.net> <20170805213034.1012-2-mail@cbaines.net> <20170808101401.036301f9@scratchpost.org> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/9k5F6v.vfM8VMoW=rg1.wgX"; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27977-done Cc: 27977-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Sig_/9k5F6v.vfM8VMoW=rg1.wgX Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 8 Aug 2017 10:14:01 +0200 Danny Milosavljevic wrote: > LGTM! Thanks for your review Danny. I've now pushed :) --Sig_/9k5F6v.vfM8VMoW=rg1.wgX Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlmKFqBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xd1UQ/+Mt+gjuXRK/6l+foFtA9fHg8muSGWYWmy/SQ40oVo2pAoUJfypMOrXi0j tGqSC0CVbgBreRvN6k8AJIAlEitUi4tzX2pm+WhBT/9qWgtckmf2AtPqWMhfpgtM Fn9BN5LCHcvy9j96lMT69Vt2DDTcGFBcuSmCisiykAIUNj6EfnBUs82PKj922m1A bZyI42AfJpqGlEQy+n9l+FYS42ms20nuTFVxcXi6/mFzEL09tt/GxFuTp5m6ELiI ORfkQr6y9t7+eIUqII4Z/5r1poIlSIEDo0l6/VRL6Rp2qIPSm0yLtBiszxx+4K9b Ca4ln7lx5izhRJ7TW5RtALNQsTgWZVLIxa0GVQNB2zARndyxRuN54iOrcad5Ibtw mvR61BXwZucCFS+1WpJrRfxxfYyIZ9+akljTOXK8etms8ixVbNEKyPOWQw6v9PKs GW4YFMO3OSk/G13y3Elk9J6FzgHkvqF/XwNhznpHrVNjFwK1jlFP2c1AHucY9gj3 RLgARq5m+nxLHJprFTlLhTqyl7njlPcPRIArB5LwltDvVnhGcM24K6j/nVYvQY3E tAvZprO9ChTj12ssF4kx4Dqkn8fKBwpK09Dvh9oy9d81cY5yb20zgWeiNHpCS9x5 Ln+tLZaOOKOBx00o3AMd3rZO72l2v+wi762Qk8afCopu6aqoTXo= =IQvi -----END PGP SIGNATURE----- --Sig_/9k5F6v.vfM8VMoW=rg1.wgX-- ------------=_1502222042-31752-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Aug 2017 21:27:06 +0000 Received: from localhost ([127.0.0.1]:43801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de6bB-0005FC-Mz for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:27:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de6b9-0005Eb-Gi for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:27:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1de6b3-00050I-Md for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:26:58 -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]:35714) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1de6b3-00050E-Jv for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:26:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1de6b2-0004JF-JP for guix-patches@gnu.org; Sat, 05 Aug 2017 17:26:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1de6ax-0004yJ-Lv for guix-patches@gnu.org; Sat, 05 Aug 2017 17:26:56 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:44959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1de6ax-0004y0-GG for guix-patches@gnu.org; Sat, 05 Aug 2017 17:26:51 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id C8540154C2E; Sat, 5 Aug 2017 22:26:48 +0100 (BST) Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id A9FB1154C2C for ; Sat, 5 Aug 2017 22:26:48 +0100 (BST) Date: Sat, 5 Aug 2017 22:26:46 +0100 From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH] services: herd: Fix matching ok responses and add stop service procedure Message-ID: <20170805222646.149cb45a@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/hpha6wBzvNG4Hr.Ez/ktviH"; protocol="application/pgp-signature" 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.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --Sig_/hpha6wBzvNG4Hr.Ez/ktviH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Patches incoming... --Sig_/hpha6wBzvNG4Hr.Ez/ktviH Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlmGOBZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xc2xw//RsHZmm6t+lZ9TKY0tuVpWwOpYFHacTwF3STIEas/M1gouFEQOotE28J+ ZqDFMBADyEuggBuFdP/IBTyMMk9jD+qikkNDXCFc+5hmH7pmH6M0jJk+PGZTxL2j E2N6x6uMYlgtEYU8JU7AEHN5b73Ii7Jj4FZ8ONsk9+DTkSc7TjuWm/EDMJaxbsa3 8oYdsWuqb+iQ8QzqLsDwnw0Aj5jjtATnUDJNJyqx+s5DseevaBtZIsScM9TWLeg6 LrcjMOenGMQMZfRx+s2Tb56ZX/ie1ykQEBNufkGa0Utb2L8HoDqwXSgO8aF042ZO lUCImNDATXzJQWFPMgZQvRlr8K4u5TdnZrKJNSuNCCDoGmwp0OPp/2d2If0g0YzA HUQ1yECYp/hKNQw/3HJs41Vy+ZwElub1RCiVIOS+0emTNZqErM2Izrs1RmFD6PRU 8MCerdQJ0xYlr7nurZHs8om8GSIMxiawM8Dwb9iJN9AlpupscDLTNgcCApPaVx5U +qYaBuiPvhD1To7y9OhUyDPcVzHcgFFo0vQwPvSn41wT9LsXqkwbNLaROXfNADEA BuGZhxdQahruGblWWa+aOBfgZLIQSCU0K513YbgI/keaYzVS/uZnZ3aLtvXNCpDd Jihd5FRS1Fc7/boUcfhxLtbKz3IotEfZuGGnXXnovTUlWKU/id4= =pEE/ -----END PGP SIGNATURE----- --Sig_/hpha6wBzvNG4Hr.Ez/ktviH-- ------------=_1502222042-31752-1-- From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH 1/2] services: herd: Fix matching ok responses from shepherd service. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Aug 2017 12:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 27977@debbugs.gnu.org Received: via spool by 27977-submit@debbugs.gnu.org id=B27977.150340559310059 (code B ref 27977); Tue, 22 Aug 2017 12:40:02 +0000 Received: (at 27977) by debbugs.gnu.org; 22 Aug 2017 12:39:53 +0000 Received: from localhost ([127.0.0.1]:48750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dk8TI-0002cB-P2 for submit@debbugs.gnu.org; Tue, 22 Aug 2017 08:39:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dk8TH-0002bw-BC for 27977@debbugs.gnu.org; Tue, 22 Aug 2017 08:39:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dk8T6-0005d8-Mi for 27977@debbugs.gnu.org; Tue, 22 Aug 2017 08:39:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dk8T6-0005d2-Iz; Tue, 22 Aug 2017 08:39:40 -0400 Received: from [193.50.110.251] (port=38204 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dk8T6-0005RA-2x; Tue, 22 Aug 2017 08:39:40 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170805222646.149cb45a@cbaines.net> <20170805213034.1012-1-mail@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Fructidor an 225 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 22 Aug 2017 14:39:36 +0200 In-Reply-To: <20170805213034.1012-1-mail@cbaines.net> (Christopher Baines's message of "Sat, 5 Aug 2017 22:30:33 +0100") Message-ID: <87a82r7p4n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Christopher Baines skribis: > Previously the match expression case for a successful response > (where error is #f) required that the result component contained a list w= ith a > single element. Good catch! Ludo=E2=80=99. From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH 1/2] services: herd: Fix matching ok responses from shepherd service. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Aug 2017 15:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 27977@debbugs.gnu.org Received: via spool by 27977-submit@debbugs.gnu.org id=B27977.15034171793010 (code B ref 27977); Tue, 22 Aug 2017 15:53:02 +0000 Received: (at 27977) by debbugs.gnu.org; 22 Aug 2017 15:52:59 +0000 Received: from localhost ([127.0.0.1]:49746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkBUA-0000mT-Jw for submit@debbugs.gnu.org; Tue, 22 Aug 2017 11:52:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkBU8-0000mF-ND for 27977@debbugs.gnu.org; Tue, 22 Aug 2017 11:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkBU0-0001OJ-De for 27977@debbugs.gnu.org; Tue, 22 Aug 2017 11:52:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkBU0-0001OE-93; Tue, 22 Aug 2017 11:52:48 -0400 Received: from [193.50.110.251] (port=39732 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dkBTz-0000ml-Qp; Tue, 22 Aug 2017 11:52:48 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170805222646.149cb45a@cbaines.net> <20170805213034.1012-1-mail@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Fructidor an 225 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 22 Aug 2017 17:52:44 +0200 In-Reply-To: <20170805213034.1012-1-mail@cbaines.net> (Christopher Baines's message of "Sat, 5 Aug 2017 22:30:33 +0100") Message-ID: <87h8wz38hf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Christopher Baines skribis: > Previously the match expression case for a successful response > (where error is #f) required that the result component contained a list w= ith a > single element. > > As far as I see when looking at the responses from the shepherd, this is = not > normally the case. Therefore, to avoid treating successful responses as > errors, make the match requirement more permissive, accepting any value. > > * gnu/services/herd.scm (invoke-action): Change match condition for ok re= sponses. > --- > gnu/services/herd.scm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm > index f8d60a480..49400aba4 100644 > --- a/gnu/services/herd.scm > +++ b/gnu/services/herd.scm > @@ -146,7 +146,7 @@ result. Otherwise return #f." > (force-output sock) >=20=20 > (match (read sock) > - (('reply ('version 0 _ ...) ('result (result)) ('error #f) > + (('reply ('version 0 _ ...) ('result result) ('error #f) > ('messages messages)) Actually this is not OK (it broke system tests because =E2=80=98current-services=E2=80=99 was now getting a single-element list in= stead of the list of service sexps.) The reason for this is that the =E2=80=98action=E2=80=99 method in the Shep= herd, when invoked on a symbol, returns a list of results, one for each service of that name: (define-method (action (obj ) the-action . args) "Perform THE-ACTION on all the services named OBJ. Return the list of results." (let ((which-services (lookup-running-or-providing obj))) (if (null? which-services) (let ((unknown (lookup-running 'unknown))) (if (and unknown (defines-action? unknown 'action)) (apply action unknown 'action the-action args) (raise (condition (&missing-service-error (name obj)))))) (map (lambda (service) (apply action service the-action args)) which-services)))) (With the exception of actions called on the =E2=80=98unknown=E2=80=99 serv= ice, which we should probably get rid of.) So either we revert the change, or we do this: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm index e16d51b9d..7614c7f9f 100644 --- a/gnu/services/herd.scm +++ b/gnu/services/herd.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2016 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2016, 2017 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. @@ -186,7 +186,11 @@ of pairs." "Return the list of currently defined Shepherd services, represented as objects. Return #f if the list of services could not be obtained." - (with-shepherd-action 'root ('status) services + (with-shepherd-action 'root ('status) results + ;; We get a list of results, one for each service with the name 'root'. + ;; In practice there's only one such service though. + (match results + ((services _ ...) (match services ((('service ('version 0 _ ...) _ ...) ...) (map (lambda (service) @@ -194,22 +198,22 @@ obtained." (live-service provides requires running))) services)) (x - #f)))) + #f)))))) =20 (define (unload-service service) "Unload SERVICE, a symbol name; return #t on success." (with-shepherd-action 'root ('unload (symbol->string service)) result - result)) + (first result))) =20 (define (%load-file file) "Load FILE in the Shepherd." (with-shepherd-action 'root ('load file) result - result)) + (first result))) =20 (define (eval-there exp) "Eval EXP in the Shepherd." (with-shepherd-action 'root ('eval (object->string exp)) result - result)) + (first result))) =20 (define (load-services files) "Load and register the services from FILES, where FILES contain code that --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Probably this patch is better than reverting. Thoughts? Ludo=E2=80=99. --=-=-=-- From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH 1/2] services: herd: Fix matching ok responses from shepherd service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Aug 2017 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Cc: 27977@debbugs.gnu.org Received: via spool by 27977-submit@debbugs.gnu.org id=B27977.15034203007734 (code B ref 27977); Tue, 22 Aug 2017 16:45:02 +0000 Received: (at 27977) by debbugs.gnu.org; 22 Aug 2017 16:45:00 +0000 Received: from localhost ([127.0.0.1]:49780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkCIW-00020f-JL for submit@debbugs.gnu.org; Tue, 22 Aug 2017 12:45:00 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:33283 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkCIV-00020Y-Eu for 27977@debbugs.gnu.org; Tue, 22 Aug 2017 12:45:00 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id ADBDD13D23E; Tue, 22 Aug 2017 17:44:58 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 77AE013D23A; Tue, 22 Aug 2017 17:44:58 +0100 (BST) Date: Tue, 22 Aug 2017 17:44:52 +0100 From: Christopher Baines Message-ID: <20170822174452.3784d96c@cbaines.net> In-Reply-To: <87h8wz38hf.fsf@gnu.org> References: <20170805222646.149cb45a@cbaines.net> <20170805213034.1012-1-mail@cbaines.net> <87h8wz38hf.fsf@gnu.org> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/H+i+m.duOEkMrc.quuv6mT1"; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Sig_/H+i+m.duOEkMrc.quuv6mT1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 22 Aug 2017 17:52:44 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Probably this patch is better than reverting. >=20 > Thoughts? I had to apply that patch with --ignore-whitespace-change, as the code in the middle of (current-services) has been indented outside of that patch. I think I get what is going on. As far as I understand it, the (match results ((services _ ...) ... bit is equivilent to the use of first in the other procedures, which suggests to me that you could use first in (current-services)? I'm guessing that the only difference is that they will fail differently on the empty list? Also, I've successfully ran the memcached service test with this change, so there is no regression there which is good :) --Sig_/H+i+m.duOEkMrc.quuv6mT1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlmcX4ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xc3bg/+IQFpklYoiy1N9S5YBorUu/3RPO9JfbUtSpa88bk81WPZ+xQdxKFGmSOB 8bOYF21Pu82BhSTJxpGWfYaTzO51tI8phW4S8Il4EJIbuly+s0Bs73kzaXKqdLO6 JLSSzXMSDrmWt+9/U6IAhxnFJboJcK6LOVN4dOjkRCZ3ueTnoJDG7JCItvW6if9e PANzSjuT5ygu3gWjlHkyEha+i7pnhaMXHYeKlzXZ8WfDC+MGW2z51VF736X3TRFk F9ovIJrz9TawgWWZRKDpJcZD1gYc+0izatwLCH15xph3YmG2s1FJrbbQjYu2z/m4 jLaaiKQJ57xNnkQ0+7fQZGF4o8GuP6dfb8m4e9a/Nzb6ri6OobwVGE1Jy2Jd/sfg FJSX6mmKgesfexCWHgfntPj13wLTbsEUkwKjAG6hwKnothRDrRMfpFeg11LAvCCh ZRe8cBvgw64jnd+PnuMfrB9+I4gIvcPQUU5idqv2MsyW5/+pKQPi6Se/YLtGcNAz utjYDNUjIdjPffhdYHTxXogdzaKXlPvlXro/HxFQfmshUP0i4OILtmN7d3S2hCNa cG0EpPrfU1Nk4YfRV6U+0h17Qrelbi2A5pb/5zaWdI4v8j/ERA7h55rYfB0Sd03o InS7tzWb5uuowfpMv4hl+Kdf9XN+0vh5YHQLunF6sz+cgVUzEus= =H9os -----END PGP SIGNATURE----- --Sig_/H+i+m.duOEkMrc.quuv6mT1-- From unknown Fri Jun 13 10:57:05 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27977] [PATCH 1/2] services: herd: Fix matching ok responses from shepherd service. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Aug 2017 22:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27977 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 27977-done@debbugs.gnu.org Received: via spool by 27977-done@debbugs.gnu.org id=D27977.15034410317130 (code D ref 27977); Tue, 22 Aug 2017 22:31:01 +0000 Received: (at 27977-done) by debbugs.gnu.org; 22 Aug 2017 22:30:31 +0000 Received: from localhost ([127.0.0.1]:50053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkHgs-0001ql-Q0 for submit@debbugs.gnu.org; Tue, 22 Aug 2017 18:30:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkHgq-0001jX-Sh for 27977-done@debbugs.gnu.org; Tue, 22 Aug 2017 18:30:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkHgk-0001qZ-UR for 27977-done@debbugs.gnu.org; Tue, 22 Aug 2017 18:30:23 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkHgk-0001qR-Qp; Tue, 22 Aug 2017 18:30:22 -0400 Received: from [2a01:e0a:1d:7270:6a6c:dc17:fc02:cfda] (port=48630 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dkHgk-00033s-Dz; Tue, 22 Aug 2017 18:30:22 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170805222646.149cb45a@cbaines.net> <20170805213034.1012-1-mail@cbaines.net> <87h8wz38hf.fsf@gnu.org> <20170822174452.3784d96c@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Fructidor an 225 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 23 Aug 2017 00:30:21 +0200 In-Reply-To: <20170822174452.3784d96c@cbaines.net> (Christopher Baines's message of "Tue, 22 Aug 2017 17:44:52 +0100") Message-ID: <87a82rnsle.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Christopher Baines skribis: > On Tue, 22 Aug 2017 17:52:44 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> Probably this patch is better than reverting. >>=20 >> Thoughts? > > I had to apply that patch with --ignore-whitespace-change, as the code > in the middle of (current-services) has been indented outside of that > patch. Right, sorry about that (I have -bB in =E2=80=98vc-diff-switches=E2=80=99). > I think I get what is going on. As far as I understand it, the (match > results ((services _ ...) ... bit is equivilent to the use of first in > the other procedures, which suggests to me that you could use first in > (current-services)? I'm guessing that the only difference is that they > will fail differently on the empty list? Yes. I=E2=80=99ve pushed it as 7d14082d56462f7bef4254d65a21fd265fbce471. Thanks, Ludo=E2=80=99.