From fa96048f0a97b4265b3c52f30a5accf89e96174b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> Date: Thu, 20 Aug 2015 19:12:36 +0200 Subject: [PATCH] profiles: Remove duplicate entries in 'etc/profile'. Reported by Andy Wingo at <http://lists.gnu.org/archive/html/guix-devel/2015-08/msg00109.html>. * guix/profiles.scm (profile-derivation)[builder]: Delete duplicates in SEARCH-PATHS. --- guix/profiles.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 5c19c95d425..d19b49f6d2d 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -702,7 +702,8 @@ (define inputs (define builder #~(begin (use-modules (guix build profiles) - (guix search-paths)) + (guix search-paths) + (srfi srfi-1)) (setvbuf (current-output-port) _IOLBF) (setvbuf (current-error-port) _IOLBF) @@ -711,9 +712,10 @@ (define search-paths ;; Search paths of MANIFEST's packages, converted back to their ;; record form. (map sexp->search-path-specification - '#$(map search-path-specification->sexp - (append-map manifest-entry-search-paths - (manifest-entries manifest))))) + (delete-duplicates + '#$(map search-path-specification->sexp + (append-map manifest-entry-search-paths + (manifest-entries manifest)))))) (build-profile #$output '#$inputs #:manifest '#$(manifest->gexp manifest) -- GitLab