From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id pRaWG7K+YmEDDQAAgWs5BA (envelope-from ) for ; Sun, 10 Oct 2021 12:21:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CJiaFbK+YmGhBQAAbx9fmQ (envelope-from ) for ; Sun, 10 Oct 2021 10:21:38 +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 E6E3128814 for ; Sun, 10 Oct 2021 12:21:37 +0200 (CEST) Received: from localhost ([::1]:34308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZVxZ-00043i-4q for larch@yhetil.org; Sun, 10 Oct 2021 06:21:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZVx2-0003al-0l for guix-patches@gnu.org; Sun, 10 Oct 2021 06:21:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZVx1-00051C-M9 for guix-patches@gnu.org; Sun, 10 Oct 2021 06:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZVx1-0003PO-Iz for guix-patches@gnu.org; Sun, 10 Oct 2021 06:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50873] [PATCH 5/7] guix home: import: Delete duplicate modules when importing. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Oct 2021 10:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50873 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50873@debbugs.gnu.org Cc: Oleg Pykhalov , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Andrew Tropin Received: via spool by 50873-submit@debbugs.gnu.org id=B50873.163386124012993 (code B ref 50873); Sun, 10 Oct 2021 10:21:03 +0000 Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:40 +0000 Received: from localhost ([127.0.0.1]:54502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZVwe-0003NV-E3 for submit@debbugs.gnu.org; Sun, 10 Oct 2021 06:20:40 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39824 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZVwd-0003N6-8P for 50873@debbugs.gnu.org; Sun, 10 Oct 2021 06:20:39 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1633861233; bh=MrpFKSnBOheEUP1Gsz6KdE+W7u6iL3Oyhb8moemgALU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=azTt7zoAjbakto9VyYwiG/eimw2nh9nKO6yFnLEL6iLbRJ3gxnbdBt6kNe4z9iiPN SMdvToN0qXCKXXWjh/JHfMSw89AfKeRhZsyYAWUhxLdCio5gc4f3GASoGo/OGAPFSd vH46nGfv/hLPaMPvn7BgFQk8BPVFSEjv2Gf6weIo= In-Reply-To: References: Message-Id: <2814010aadd95c389a54922958d1f3ffedeec106.1633861021.git.public@yoctocell.xyz> Date: Sun, 10 Oct 2021 12:20:33 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633861297; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=vEBGucjRfh3kH1iM/oaH8a3RyAPCBG2ujHK2suaKFuk=; b=uSl45gqb2YJ4OAo6KOLDzO59nTbQGDJOEKBy0V6pNsYaXLKKeIagHq2gUmCuYjY9WeQDYb S9QvVCQXGwTu5dfs+QxW60NxKEPOBHGacbOdohxW0pzjwuJRGAGqE2lVqC5BeZArDXU3HQ 4EIZxIHE6fnqRIhkGtGeVQH5f+cp1sdNqoEh2cWFriF9/sJRrwYI5ExTTVPXJbCCK2AZdX zO9vM4k9eP0uFk43Li0M08d4xc3qXeeS0UWfX3fpvX3oPqMk1zlLKhmAndu0WqHQbE6ZWI YpRkOqui6jC8zChIpVLsZLI0KWPn6zq6qnqu1ppSNYhhxu4EUGKIm8eO3KSVfg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633861297; a=rsa-sha256; cv=none; b=mNZELuj1KF+hDzWsaRB7sXZ3Zac/kWvrfaz5W7M9JEKgpoD9eLVnJSyswvyfFHLrnpW3sk ZrnWsjQHNzw0oJtkuATGxAfhAx0FBncbsZIcHq9Wf9tsfowOL13iArLWwfYp6aUUODAxfh Xt1NPKpIuTAZQkMiJ3icZ1U9roXOFBRbMvp0IlDEN8YDvTwZN5vqZ46EHUTluWrok9Zvkr yqSlhJvj7eyS6LIK5V4AsTMU0+TSZmiwOeIQOtOhPdm8tKucQp1QJ4rrh6LS8E+AVQuj5w rOOmdxibV5vfSd6pJZldGGhTP5RDhwY9rDCclfJsn8TL67efYJxU14+xnh+riw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=azTt7zoA; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 1.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=azTt7zoA; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E6E3128814 X-Spam-Score: 1.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: xbsihHDtu4b+ Two different services might require the same module(s), so delete duplicat= es when generating the =E2=80=98use-modules=E2=80=99 form. * import.scm (manifest->code): Delete duplicate modules. --- guix/scripts/home/import.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index 21f762f239..b892ae3dfa 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -145,7 +145,8 @@ (define (qualified-name entry) `(begin (use-modules (gnu home) (gnu packages) - ,@(concatenate (map cdr configurations+modul= es))) + ,@((compose delete-duplicates concatenate) + (map cdr configurations+modules))) ,(home-environment-template #:specs specs #:services (map first configurations+modules)))) @@ -188,7 +189,8 @@ (define name (use-modules (guix transformations) (gnu home) (gnu packages) - ,@(concatenate (map cdr configurations+modul= es))) + ,@((compose delete-duplicates concatenate) + (map cdr configurations+modules))) =20 ,@transformations =20 --=20 2.33.0