From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4NvwKsghfWE+mgAAgWs5BA (envelope-from ) for ; Sat, 30 Oct 2021 12:43:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8N98JsghfWHKRgAAbx9fmQ (envelope-from ) for ; Sat, 30 Oct 2021 10:43: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 79EAA3E648 for ; Sat, 30 Oct 2021 12:43:20 +0200 (CEST) Received: from localhost ([::1]:52132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mglpX-0001OE-LC for larch@yhetil.org; Sat, 30 Oct 2021 06:43:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mglpJ-0000vu-6W for guix-patches@gnu.org; Sat, 30 Oct 2021 06:43:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45190) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mglpI-0001sp-UY for guix-patches@gnu.org; Sat, 30 Oct 2021 06:43:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mglpI-0002bt-Sc for guix-patches@gnu.org; Sat, 30 Oct 2021 06:43:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50873] [PATCH v3 5/8] guix home: import: Delete duplicate modules when importing. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Oct 2021 10:43:04 +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, Oleg Pykhalov , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 50873-submit@debbugs.gnu.org id=B50873.16355905669950 (code B ref 50873); Sat, 30 Oct 2021 10:43:04 +0000 Received: (at 50873) by debbugs.gnu.org; 30 Oct 2021 10:42:46 +0000 Received: from localhost ([127.0.0.1]:56728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgloz-0002aL-Pa for submit@debbugs.gnu.org; Sat, 30 Oct 2021 06:42:46 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:59332 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mglow-0002Z6-SY for 50873@debbugs.gnu.org; Sat, 30 Oct 2021 06:42:43 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1635590557; bh=Hd1VakLjtxnp6jV7Q0I9BKs8lo/pxC+h662NKXyuRvs=; h=From:To:Subject:In-Reply-To:References:Date; b=lB4qnlY62dSgSMO87xm7ZwTFDkyuiCZZBFoLQA8UV0Kqs41WmGt9dQfVXGPv+AqCb 5OB0pODejG0IK6RYpDcfGSlGJ6aOPESfR/Gpa0LPjdSpZVfgyUtRAttn+5V66bM3Z6 OzlCpTp2y3j3xNoUKePM83Ax9Tklz15aD5QCFA24= In-Reply-To: References: Message-Id: <40ca56d2d949f7a56bce56d1221396fb85e57a4d.1635590221.git.public@yoctocell.xyz> Date: Sat, 30 Oct 2021 12:42:37 +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=1635590600; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=n0mMpjlDLFGWFlcqweIJu1jiA0CcN+X/+Ufsd4uLMi0=; b=tAI9vg8m+J5XohuOynQpviZlmedkMwhNUdly/IYGZYcNWZHeUx69/EhooSjItfAVqYZhlP mIMQy0JTIZ4RF0Mywkor+oxs5VDSekO3JkgefGKE7+AbSIGodfH/NpGPcIUbmiIvORF66k TQZu065Q1mc+GvxXQk19a2+UVSXtbeucfvuyRy5DYnOujenQvFCHsQ8nZngWRQ3mEOlSs+ tdct5ZndwuMYCkInN2EvWiZiB0mkY9VB6/A2+Gs0iu4mkddoGnJ/y/IR7dCVQ57ZqIicJ2 4bigPHPv9Q6CK/G9YoL2jTiXawyV2AmUaZ4//gvYD0mqmoqf0cETDIoOgXtQKQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635590600; a=rsa-sha256; cv=none; b=FhLe0/24c20oMqimlQVvmymV/dq5Wv00bQ13rG+YliZPPbBouWx3fg36p+Z88k9fARfurJ V63mho+o6qcTFPJ2IgWqvKRQsh9n28J3b1nMERmeAdDo9SDYmDU+EOKYsHMV4123aRIU1U hz/soRQ9t1SrSbMtwXU8AfAyyZcNvyT7aZXi8EOky/vDgWx8z/qIfK5W1Fq7dY1CqweKE4 tormbrM0/r6EAgBPYR3YDbeeTrYP70PMLi1NFFKCDatsq3KHxczh7sgQ82YD51FlZzfNLx Wm+3YhnumDxEfhRclDgD1sbTI1rpAx3g8zR6YsI1K9z4mCk6uORHCDu208YMXQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=lB4qnlY6; 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.18 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=lB4qnlY6; 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: 79EAA3E648 X-Spam-Score: 1.18 X-Migadu-Scanner: scn0.migadu.com X-TUID: LuKYlGSrUFZA 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 0e7c454f45..f0ae233b75 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -145,7 +145,8 @@ (define (qualified-name entry) (use-modules (gnu home) (gnu packages) (gnu services) - ,@(concatenate (map cdr configurations+modul= es))) + ,@((compose delete-duplicates concatenate) + (map cdr configurations+modules))) ,(home-environment-template #:specs specs #:services (map first configurations+modules)))) @@ -190,7 +191,8 @@ (define name (gnu home) (gnu packages) (gnu services) - ,@(concatenate (map cdr configurations+modul= es))) + ,@((compose delete-duplicates concatenate) + (map cdr configurations+modules))) =20 ,@transformations =20 --=20 2.33.0