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 +BOzCdDznWWxLwEAkFu2QA (envelope-from ) for ; Wed, 10 Jan 2024 02:33:04 +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 oA9rA9DznWV1AwAA62LTzQ (envelope-from ) for ; Wed, 10 Jan 2024 02:33:04 +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=lII+Xp+r; 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=1704850384; 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=f5LiXhjH2EXESp43g8YATszXapNINrczY50jvoeynxI=; b=iZPP2czBkniqaU+dHhYFit4ptMJMLJ3Cdnxc67qbNZEUXTWFLmq0I0P/GBs9A4e6AIfvau P4Nq/1uasH7BEvAGCGjtARi/tvd3ygTMoFByNnesxgC4WFOfIyS2kRvAiFTYq5oEfcFr+R oUsjZtcfWvA+BLcYjhY1kVrXwqQlJ4+hlBpWHfpOb19pO/ZFSPK7wNIZR6k9bbjoYxw2Co MnHReemHlMuJ6TCrGAeZFSYCeryzCSS+/hOlz26/QtDawnbCzxFgRzPgZDAFVNh6a6PyMK 4KgpWeQlcqVzMNaw8UwYTBQ9HSJMjUA1xClNNGsZTrEJKCqp9qhOFhI150/zdg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=lII+Xp+r; 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=1704850384; a=rsa-sha256; cv=none; b=nhWv8cmz5jsZm/hrzP/eylG7Pl9IKnXhaqE5qgT9RnjNxmdK8W74T19gjmIFxr02UeM9+5 oviqHMWMvGFcLjQpyxlVcDeWMoLFLJzjKd/IAifMj1rO191WNgL5AUB8fQBHMgyin1S9qA T4pP9/J7iEV8NbXWHwWgQUFVrGxHwtZTfi7w2Urai9SfVXg/6E968J1yV9FUE1nrnG5epf jE15kfRdDd0h3ZJs1HcvBe4MCsFqj3VGB2YDhPAg6O40i9iS4nt6txb6zO/HIg2LFisGIV QL95oR1e3vzn0SWSXS9Jj6QuhZRhSCG6WCdOsM7y9MGLPq/Zk2Zn5b/BPfcZ6g== 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 BDD9211D8B for ; Wed, 10 Jan 2024 02:33:03 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNNSi-0003YF-DP; Tue, 09 Jan 2024 20:32:56 -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 1rNNSh-0003XQ-G5 for guix-patches@gnu.org; Tue, 09 Jan 2024 20:32:55 -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 1rNNSh-0008Us-65 for guix-patches@gnu.org; Tue, 09 Jan 2024 20:32:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNNSo-0002YN-8W for guix-patches@gnu.org; Tue, 09 Jan 2024 20:33: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 01:33: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.17048503309745 (code B ref 68357); Wed, 10 Jan 2024 01:33:02 +0000 Received: (at 68357) by debbugs.gnu.org; 10 Jan 2024 01:32:10 +0000 Received: from localhost ([127.0.0.1]:41417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNNRx-0002X6-O7 for submit@debbugs.gnu.org; Tue, 09 Jan 2024 20:32:10 -0500 Received: from tilde.club ([2607:5300:203:b92b::114]:46742 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNNRv-0002Ww-M0 for 68357@debbugs.gnu.org; Tue, 09 Jan 2024 20:32:08 -0500 Received: from fedora.. (unknown [87.117.56.99]) by tilde.club (Postfix) with ESMTPA id 1B75822559F04; Wed, 10 Jan 2024 01:31:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 1B75822559F04 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1704850319; bh=RbIt6DMvY/89lcJDlPqBczDfnEYVN/XSsT4a331fqkc=; h=From:To:Cc:Subject:Date:From; b=lII+Xp+rgkb8QF4dQCqJhKO4Bfre/aOkEOJI/r282fbcOUuv4exnA/NbGjIBRkdYy NaoFcd445bibFZjznlQ8jL2eRYZgrKeIcduFLMXmWNIeyvP+1chpfGq0HQ4Mf8NZaj 4ARDaWbTdXYaTRHweknBGXUG8k5iRoF4hzTPpRmg= From: "zero@fedora" Date: Wed, 10 Jan 2024 04:30:59 +0300 Message-ID: <20240110013058.1822277-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-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: BDD9211D8B X-TUID: Xk87SRbVereq * modules/shepherd/service.scm: fix `unload all` --- 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