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 0BveEtBSU2E7YgEAgWs5BA (envelope-from ) for ; Tue, 28 Sep 2021 19:37:20 +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 gPNzDtBSU2GubQAAbx9fmQ (envelope-from ) for ; Tue, 28 Sep 2021 17:37:20 +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 D0976800 for ; Tue, 28 Sep 2021 19:37:19 +0200 (CEST) Received: from localhost ([::1]:44792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVH2c-0004n5-Un for larch@yhetil.org; Tue, 28 Sep 2021 13:37:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVH2M-0004MK-VX for guix-patches@gnu.org; Tue, 28 Sep 2021 13:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVH2M-0006gi-OA; Tue, 28 Sep 2021 13:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVH2M-0001FH-Lj; Tue, 28 Sep 2021 13:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50873] [PATCH 4/5] guix home: import: Delete duplicate modules when importing. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, andrew@trop.in, guix-patches@gnu.org Resent-Date: Tue, 28 Sep 2021 17:37:02 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Andrew Tropin X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Andrew Tropin Received: via spool by 50873-submit@debbugs.gnu.org id=B50873.16328505684689 (code B ref 50873); Tue, 28 Sep 2021 17:37:02 +0000 Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 17:36:08 +0000 Received: from localhost ([127.0.0.1]:46931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVH1T-0001DZ-P7 for submit@debbugs.gnu.org; Tue, 28 Sep 2021 13:36:07 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33286 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVH1S-0001Cj-8g for 50873@debbugs.gnu.org; Tue, 28 Sep 2021 13:36:06 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1632850560; bh=noR8bcNYCpsS7urz40MGuCN1Dw4WfxLNXQpd0Scl5Zg=; h=From:To:Subject:In-Reply-To:References:Date; b=r+Fy5q/jJHbJ5HLE0TS/Tna/RGOYHxzwTInNtYs7eCdsCdflZnlfXq6NofAAmmflQ f7dTV1E2liwYIXWypkoEcDFUA5NTEpfPq5P8bHjKjEoqea1j6rEelOd9kPzuumota1 HTa7jRF0lbPwtmmz9WKLK/vCjlfKOcykR0SauiYY= In-Reply-To: References: Message-Id: <7063704a274d99c8ea0bdc437a05b74e9fd78a49.1632849969.git.public@yoctocell.xyz> Date: Tue, 28 Sep 2021 19:36:00 +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=1632850639; 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=XVJmSvKcgMa+LwX/UpqDMJ1k/nZzJmvLF15UNBw1wec=; b=fjPLoJ+wvLiCpJOKKx4jGPAJhBRVygmsgNdd3LFMbA2w6ANWQwK3KXGUWoUG3oLuLqoVhO re76lhjyK6R724mAzFJXwZFSJ/8sOiZj5UfO1z8C9NJYULvfTgWFDl8PUIse3KNznfCcG3 9LfofE5DzTM+6IZfIawim9GNMJUJD3uat7juegCmImLClDt5UcEuq9HkKu9lhbblj91x9P s7sxZjiLyS+UgD52KGM7hJaHNmnN/V4piN/ex5YS2IAktprC5JSBPSCCuI63wPLvYLss0S 3uULNXg6XXSA7KG6I1UgvGWxGLHqkuoUj7kL/H2BC35iSoBjbKrKngVE6BsxzQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632850639; a=rsa-sha256; cv=none; b=p5y9c+lrjEIJAuNyAFZvW7547sHrKQ2oiRrV7xjKKqwz6et+dFCLis+G8tTznHG7bOAB36 3Sydc65n0uvFMlzDvB+wI9iKpPqpA25uwLiwZ/hiXU6yaxN96EfqH2+qWyl1SrPpLlpzaJ IkcSPz31s/8zCZXnANt+maCEIOCCYZhdhiPRR0YmT1p/sDF87JhCr74APb2vQkpmsIKqan k0hbcwbjqiPcYFfPsnaNDFY3LTfH6KW+NfFmOUnyRngfkOoU9D8vVcoXsXzLCmkGg8/QDZ yRUUTJG9V1ygq4fHwnw2CtGyyulwHnTWtp0ZvCLmq9lGYe/7S5g02MfBtZfJkA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b="r+Fy5q/j"; 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: -0.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b="r+Fy5q/j"; 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: D0976800 X-Spam-Score: -0.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: K3m2Yxe+Ta/4 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 6d9ca98f28..5ba99378af 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -149,7 +149,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)))) @@ -192,7 +193,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