From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id wIaEFovlnWWaUgAAkFu2QA (envelope-from ) for ; Wed, 10 Jan 2024 01:32:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mKwKEIvlnWXjTgEA62LTzQ (envelope-from ) for ; Wed, 10 Jan 2024 01:32:11 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=urv6VDaw; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704846731; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9NtRvIyHaZpIO2lw8Re2pQlTw9VJ0o43PW8O8qeVc3w=; b=bg8ew4LeRnvzjHPZ3rCrTTv++RKUZaIqvOKLhAi1j/G+XeAnAHT1UGXdAExzHE8jR2zsL8 SrPSNjgK65iKgkowNoSwt3YBT/pIP2n3M0yi1KteEAxD99GYd9cceKBL2T+PV9dx3uI0K7 3wdP01sqj+Ze3aquWk04bKFRUvCaZRxNOPaImj3jV6eSHgKUFhOTTFIlnzcERgc/hkYDzT JM/PVnNMfEIglGPgWwwQMfhEudaodjDfNeKmtf+dhc68i5FJrJoqXc4ufsTzqJjpwjZ8PJ 1zpvxrdSPPUV6l4v33hKdh7PPhZOVmMl1SrBGHmGYmPM59uTlZkC0J9wSb73dg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=urv6VDaw; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704846731; a=rsa-sha256; cv=none; b=sPSTxFNb2wczLIBovTQUsLWQHl+YgjOD+LpP/gfqZ0R7pgAEZ1Fum/r9AXSw0GzfvVxwQt aDzma3ziF9V/qonMZSXcZo4n76YCbABrAmgHPouFYSPeU2S155n5H0kefC6tdr9/DT6kfv 7bRAVVJYCnTta9L9eNPuj8Ifay8L4TPlOA13cqMqY4Xdzxy6QRPMOQffS3VCLYzWMkSOAo PEVoKLBc26brMCmcQUg4twqUpD6S9Ie07gXZPuGe5zHC0pp5XcOme/1ekSzzBx8wVj/AVw 4TAIsBKRh3Hm+5oPqbmbic3ldJ42XtcG8F+gb3H35riI9EKQFlPXvlsQ8zkS8Q== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0CAC964CF3 for ; Wed, 10 Jan 2024 01:32:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNMVh-0005hg-Hs; Tue, 09 Jan 2024 19:31:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNMVg-0005ff-1S for guix-patches@gnu.org; Tue, 09 Jan 2024 19:31:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNMVf-0007Ul-Lz for guix-patches@gnu.org; Tue, 09 Jan 2024 19:31:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNMVm-0007Io-H0 for guix-patches@gnu.org; Tue, 09 Jan 2024 19:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68357] [PATCH] service: fix `unload all` * modules/shepherd/service.scm: fix `unload all` Resent-From: "zero@fedora" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Jan 2024 00:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68357 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68357@debbugs.gnu.org Cc: "zero@fedora" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170484669627567 (code B ref -1); Wed, 10 Jan 2024 00:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jan 2024 00:31:36 +0000 Received: from localhost ([127.0.0.1]:41358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNMVF-00075Y-GA for submit@debbugs.gnu.org; Tue, 09 Jan 2024 19:31:35 -0500 Received: from lists.gnu.org ([2001:470:142::17]:41020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNMVE-0006y2-6D for submit@debbugs.gnu.org; Tue, 09 Jan 2024 19:31:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNMUz-0005el-Up for guix-patches@gnu.org; Tue, 09 Jan 2024 19:31:13 -0500 Received: from tilde.club ([2607:5300:203:b92b::114]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNMUr-00075Z-R8 for guix-patches@gnu.org; Tue, 09 Jan 2024 19:31:13 -0500 Received: from fedora.. (unknown [87.117.56.99]) by tilde.club (Postfix) with ESMTPA id CD7E72266734F; Wed, 10 Jan 2024 00:31:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club CD7E72266734F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1704846661; bh=laX3czovM+vY/7jT6xQIBnFiPPmYcUaRHewoGmswbS0=; h=From:To:Cc:Subject:Date:From; b=urv6VDawjG3lAK9/Nm3TiW6juyjcIi8KZk8gdMNvFMuWQDq6+zocjapiRsGGo7XMU xpiIc1ZZilY5v6/5TrgGZPvkdO7NfZ+d+a8k+OrK4lIGgk4Ckc0D47TvaIzPbWArw+ +UVadEKr68qzmUfJTEkfDzeaCuy3hYPy/NaRGEgU= From: "zero@fedora" Date: Wed, 10 Jan 2024 03:29:22 +0300 Message-ID: <20240110003016.1761645-2-shinyzero0@tilde.club> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:5300:203:b92b::114; envelope-from=shinyzero0@tilde.club; helo=tilde.club X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.19 X-Spam-Score: -2.19 X-Migadu-Queue-Id: 0CAC964CF3 X-TUID: 8nb/o44yHPsR --- modules/shepherd/service.scm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm index 5be78bd..54d3400 100644 --- a/modules/shepherd/service.scm +++ b/modules/shepherd/service.scm @@ -1136,11 +1136,6 @@ requests arriving on @var{channel}." (length lst)) (map service-canonical-name lst)) (loop registered)))) - (('unregister-all) ;no reply - (let ((root (cdr (vhash-assq 'root registered)))) - (loop (fold (cut vhash-consq <> root <>) - vlist-null - (service-provision root))))) (('lookup name reply) ;; Look up NAME and return it, or #f, to REPLY. (put-message reply @@ -2638,8 +2633,11 @@ requested to be removed." (let ((name (string->symbol service-name))) (cond ((eq? name 'all) ;; Special 'remove all' case. - (put-message (current-registry-channel) `(unregister-all)) - #t) + (unregister-services + (filter + (lambda (sv) + (not (eq? (service-canonical-name sv) 'root))) + (service-list)))) (else ;; Removing only one service. (match (lookup-service name) -- 2.43.0