From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cNVFC6DWtV4/LwAA0tVLHw (envelope-from ) for ; Fri, 08 May 2020 22:01:04 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YOsAO6zWtV68EwAA1q6Kng (envelope-from ) for ; Fri, 08 May 2020 22:01:16 +0000 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 2EFFA940E80 for ; Fri, 8 May 2020 22:01:14 +0000 (UTC) Received: from localhost ([::1]:38006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXB3R-0002ZS-Ud for larch@yhetil.org; Fri, 08 May 2020 18:01:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXB3H-0002Z1-7h for bug-guix@gnu.org; Fri, 08 May 2020 18:01:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34872) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXB3G-0001tX-SZ for bug-guix@gnu.org; Fri, 08 May 2020 18:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jXB3G-0000G6-Pq for bug-guix@gnu.org; Fri, 08 May 2020 18:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41140: =?UTF-8?Q?=E2=80=9Cguix_?= =?UTF-8?Q?system=E2=80=9D?= suggests wrong module import when using =?UTF-8?Q?=E2=80=9Cremove=E2=80=9D?= Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 08 May 2020 22:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41140 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 41140@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1588975222930 (code B ref -1); Fri, 08 May 2020 22:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 May 2020 22:00:22 +0000 Received: from localhost ([127.0.0.1]:46418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXB2b-0000Eu-Vp for submit@debbugs.gnu.org; Fri, 08 May 2020 18:00:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:43278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXB2V-0000Ee-QW for submit@debbugs.gnu.org; Fri, 08 May 2020 18:00:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXB2V-0002TK-GP for bug-guix@gnu.org; Fri, 08 May 2020 18:00:15 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jXB2U-0000Ok-9k for bug-guix@gnu.org; Fri, 08 May 2020 18:00:15 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1588975211; cv=none; d=zohomail.com; s=zohoarc; b=l5L0z08nc/3AoTRu9a5OkdII0BSD2r0+uwFY71bLkp/qtu87tkgJWOJo4Tbq+c+FA8D65KlBK3mg0trYjDRNpleNEf6H4RDF8h45iTaxuT/keMG2G3K48q3A5Q3xYfFWo5U4vA2iY1tsShqKKEJ4MJ2pfHK9g1zCGcMjnjFpuao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588975211; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=FCf2JepdS3QuIjDepQ1o0Di/JCnAYRwLmdQPFem7ngU=; b=VL6uojJRX7IN0paCAMdCXygdBBC1wgP0w5kGvXf/DNjA8FClsMsTYq5mQjSuDCcvWlmvYEwJmRbaUjvqTrC5ZMTdT8yGdgljQH1O+S4nRLwPw4TRhL8s15ehogVqDOAiK0NUh+SyuYTOubJvZmM14KavAX/DAP8Isk+aoNaHpBI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1588975211; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=FCf2JepdS3QuIjDepQ1o0Di/JCnAYRwLmdQPFem7ngU=; b=i4jbvmcdWK+47tcfl4vs4rR0eYyE14Zq2F1DIiOAjveANhvrpYloabzElWRiu+4t uqy+cNOAcOZz9DKAVKE1j+s7pMly0t6FRu8/AB4PcJ/Bx6T4lHxr88cKYCYnfIGPMRF LIBMcL3Rs4q3naaE1x9cE45Or4cfHsV3hXIzx7N8= Received: from localhost (p54AD4BDF.dip0.t-ipconnect.de [84.173.75.223]) by mx.zohomail.com with SMTPS id 1588975208580384.8162927891266; Fri, 8 May 2020 15:00:08 -0700 (PDT) User-agent: mu4e 1.2.0; emacs 26.3 From: Ricardo Wurmus X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sat, 09 May 2020 00:00:05 +0200 Message-ID: <87lfm22il6.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.53; envelope-from=rekado@elephly.net; helo=sender4-of-o53.zoho.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/08 16:39:42 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 X-Spam-Score: 1.99 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=elephly.net header.s=zoho header.b=i4jbvmcd; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Scan-Result: default: False [1.99 / 13.00]; GENERIC_REPUTATION(0.00)[-0.54040952625012]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; R_DKIM_REJECT(1.00)[elephly.net:s=zoho]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.09), country: US(-0.00), ip: 209.51.188.17(-0.54)]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24]; TO_DN_NONE(0.00)[]; ARC_REJECT(2.00)[signature check failed: fail, {[1] = sig:zohomail.com:reject}]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; DKIM_TRACE(0.00)[elephly.net:-]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[84.173.75.223:received]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[rekado@elephly.net,bug-guix-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; SPF_REPUTATION_HAM(0.00)[-0.56525643558953]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[elephly.net]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: safVVtYaxncB I want to delete a service from %desktop-services, so I write --8<---------------cut here---------------start------------->8--- =E2=80=A6 (services (remove (lambda (service) (eq? (service-kind service) that-annoying-service-type)) %desktop-services)) =E2=80=A6 --8<---------------cut here---------------end--------------->8--- Then I run =E2=80=9Cguix system build config.scm=E2=80=9D and Guix tells me= that it doesn=E2=80=99t know what =E2=80=9Cremove=E2=80=9D is: --8<---------------cut here---------------start------------->8--- config.scm:56:18: error: remove: unbound variable hint: Did you forget `(use-modules (rnrs lists))'? --8<---------------cut here---------------end--------------->8--- I add the suggested module import to my file and it no longer complains, but that-annoying-service-type has not actually been removed. Oh no! Of course, the Guix manual says this: --8<---------------cut here---------------start------------->8--- Again, =E2=80=98%desktop-services=E2=80=99 is just a list of service obj= ects. If you want to remove services from there, you can do so using the procedures for list filtering (*note (guile)SRFI-1 Filtering and Partitioning::). For instance, the following expression returns a list that contains all the services in =E2=80=98%desktop-services=E2=80=99 minus the Avahi service: (remove (lambda (service) (eq? (service-kind service) avahi-service-type)) %desktop-services) --8<---------------cut here---------------end--------------->8--- But maybe I don=E2=80=99t know what SRFI-1 is and I trust that the hint Guix provides will be the right thing to do. But now I=E2=80=99m curious and I look at the documentation for =E2=80=9Cre= move=E2=80=9D from (rnrs lists): --8<---------------cut here---------------start------------->8--- -- Scheme Procedure: remp proc list -- Scheme Procedure: remove obj list -- Scheme Procedure: remv obj list -- Scheme Procedure: remq obj list =E2=80=98remove=E2=80=99, =E2=80=98remv=E2=80=99, and =E2=80=98remq=E2= =80=99 are identical to the =E2=80=98delete=E2=80=99, =E2=80=98delv=E2=80= =99, and =E2=80=98delq=E2=80=99 procedures provided by Guile=E2=80=99s core= library, (*note List Modification::). =E2=80=98remp=E2=80=99 is identical to the alternate= =E2=80=98remove=E2=80=99 procedure provided by SRFI-1; *Note SRFI-1 Deleting::. --8<---------------cut here---------------end--------------->8--- Oh. So here are my questions: * can we prefer (srfi srfi-1) over (rnrs lists) in the suggestions for =E2= =80=9Cremove=E2=80=9D? * can we avoid this by extending modify-services to support =E2=80=9Cdelete= =E2=80=9D much like modify-phases, and suggesting to use that instead of =E2=80=9Cremove=E2=80=9D? -- Ricardo