Hello Guix,

The attached patch (for core-updates) removes duplicate entries from search paths. I believe this is safe.

I was encountering "command line too long" errors while trying to build several higher-level perl modules, and noticed that the values being set for PERL5LIB, PATH, and others were ~318kb each. Investigating further, many of the entries were duplicates, resulting from the many propagated inputs that are needed in perl modules.

While it's possible that, even with this patch, we could encounter the same errors in the future, it hasn't happened yet, and I've been able to continue packaging modules for hydra. If it does become a problem again, we could consider patching the perl modules themselves to point to their dependent modules, thus alleviating the need to propagate so many inputs.

`~Eric
From f54561ac020a996c0a20f658dea29529ed7dc6b5 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bav...@member.fsf.org>
Date: Wed, 4 Feb 2015 09:48:39 -0600
Subject: [PATCH] utils: Strip duplicates from search path.

* guix/build/utils.scm (search-path-as-list): Delete duplicate input
  directories before searching.
---
 guix/build/utils.scm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 4407f9a..c7fdd1d 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -323,7 +323,7 @@ for under the directories designated by FILES.  For example:
                                           (list file)
                                           '())))))
                             files))
-              input-dirs))
+              (delete-duplicates input-dirs)))
 
 (define (list->search-path-as-string lst separator)
   (string-join lst separator))
-- 
1.7.9.5

Reply via email to