GNU bug report logs - #50873
[PATCH 0/5] Fixes to ‘guix home import’

Previous Next

Package: guix-patches;

Reported by: Xinglu Chen <public <at> yoctocell.xyz>

Date: Tue, 28 Sep 2021 17:34:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Xinglu Chen <public <at> yoctocell.xyz>
To: 50873 <at> debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>, Ludovic Courtès <ludo <at> gnu.org>, Andrew Tropin <andrew <at> trop.in>
Subject: [bug#50873] [PATCH 5/7] guix home: import: Delete duplicate modules when importing.
Date: Sun, 10 Oct 2021 12:20:33 +0200
Two different services might require the same module(s), so delete duplicates
when generating the ‘use-modules’ 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+modules)))
+                              ,@((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+modules)))
+                              ,@((compose delete-duplicates concatenate)
+                                 (map cdr configurations+modules)))
 
                  ,@transformations
 
-- 
2.33.0







This bug report was last modified 3 years and 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.