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 qE7uBkbmnWX71QAAkFu2QA (envelope-from ) for ; Wed, 10 Jan 2024 01:35:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id KPY5AkbmnWUnKAEA62LTzQ (envelope-from ) for ; Wed, 10 Jan 2024 01:35:18 +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=Vzn+LJjt; 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=1704846917; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9NtRvIyHaZpIO2lw8Re2pQlTw9VJ0o43PW8O8qeVc3w=; b=MuPo4QnWe7I+X/9CC9vpJBwh6xTKNbkngZh2P//i0Y8l4b+fjWxxpjUQZcXsZRgR5weNVs MNkYEPczzrIvWThqCJM3VnBEGJ1quaG/1AJTeMEtKuQQi5Td8Xf1Bwwu+mMnAUAxfBiyMR rYw3FdBVSMkYYyZ0b01hCbuDntQ82o57c3BfVHRDYwHw3FzqndaJWgMK1XsxOUS75mHL6I DGaPgLHH1FmsS4VHRi4b7HT3iVQMhlPWTEvEBJCbuIG6lAaA1aJCa3kjz+oX6HGYwQTSOz 9fEEZ9rEtAs1RgkQ9Wp8qXYfrV2DijU96wvVoVV1OQiuy8sj12A/EWz+fIGmaQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704846917; a=rsa-sha256; cv=none; b=h0tpu/ZLstz1kRP3ROuUP0r5b5dLzh2TeSN01+0IWpPP2HPsz9zPC0a/b0Hb1v2WMebgAR rONf1tVYiYicX0sSy3YOZpk/jnlqNxhOVBS2LyzroG3LP8oixiZzEssQsX7uy5OFGEYwVB MhTjKPtF9FTpgtPVzlxDv6+/JjEPRd4vvt3pca3omER+K8PaUBLdG9gUKAvR7r7p4QmuoV DDiXAbOBixcwyLQnLyjICAyGPoTNm5ljrytiKrdhV9n3JdR4zngBKsBNitjQaL21sNVNI4 kz0TxUEmuJAwAO+pZCDiwrEUImd78UN2Y++5jKa0q5+YIjKFFQNv7ALEA4W9kA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=Vzn+LJjt; 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) 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 D13463E16B for ; Wed, 10 Jan 2024 01:35:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNMYe-00073M-1a; Tue, 09 Jan 2024 19:35:00 -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 1rNMYZ-00071B-Kl for guix-patches@gnu.org; Tue, 09 Jan 2024 19:34:57 -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 1rNMYZ-0000Yc-Ch for guix-patches@gnu.org; Tue, 09 Jan 2024 19:34:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNMYg-0007OE-FX for guix-patches@gnu.org; Tue, 09 Jan 2024 19:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68357] [PATCH] shepherd: service: fix `unload all` References: <20240110003016.1761645-2-shinyzero0@tilde.club> In-Reply-To: <20240110003016.1761645-2-shinyzero0@tilde.club> Resent-From: "zero@fedora" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Jan 2024 00:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68357 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68357@debbugs.gnu.org Cc: "zero@fedora" Received: via spool by 68357-submit@debbugs.gnu.org id=B68357.170484687328358 (code B ref 68357); Wed, 10 Jan 2024 00:35:02 +0000 Received: (at 68357) by debbugs.gnu.org; 10 Jan 2024 00:34:33 +0000 Received: from localhost ([127.0.0.1]:41363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNMYD-0007NK-52 for submit@debbugs.gnu.org; Tue, 09 Jan 2024 19:34:33 -0500 Received: from tilde.club ([142.44.150.184]:38022 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNMYB-0007NB-5W for 68357@debbugs.gnu.org; Tue, 09 Jan 2024 19:34:31 -0500 Received: from fedora.. (unknown [87.117.56.99]) by tilde.club (Postfix) with ESMTPA id 66C342266734F; Wed, 10 Jan 2024 00:34:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 66C342266734F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1704846863; bh=laX3czovM+vY/7jT6xQIBnFiPPmYcUaRHewoGmswbS0=; h=From:To:Cc:Subject:Date:From; b=Vzn+LJjtq8PI6xO02YEn1CkNap/7UIhc7zedIa3zHRsqMU8Do+6sXRkG/tA1boeje Ny6MYU2Ft8GxpCzcZdFLOxCCYE04OTLniCqCERdy3OUChpagMADH3RJLVO06dOuG+k XUG9J2PkjUsFQ3vrUt6D7T94VbABWg7pPX0QMUEk= From: "zero@fedora" Date: Wed, 10 Jan 2024 03:33:15 +0300 Message-ID: <20240110003314.1763881-2-shinyzero0@tilde.club> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -2.19 X-Spam-Score: -2.19 X-Migadu-Queue-Id: D13463E16B X-Migadu-Scanner: mx11.migadu.com X-TUID: 4R8KDn491KTG --- 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