unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] utils: Strip duplicates from search path.
@ 2015-02-04 21:57 Eric Bavier
  2015-02-07 23:14 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Bavier @ 2015-02-04 21:57 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-utils-Strip-duplicates-from-search-path.patch --]
[-- Type: text/x-diff; name=0001-utils-Strip-duplicates-from-search-path.patch, Size: 937 bytes --]

From f54561ac020a996c0a20f658dea29529ed7dc6b5 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] utils: Strip duplicates from search path.
  2015-02-04 21:57 [PATCH] utils: Strip duplicates from search path Eric Bavier
@ 2015-02-07 23:14 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-02-07 23:14 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <bavier@member.fsf.org> skribis:

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

Yes, I think so.

> 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.

Ouch, OK.

> 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.

Let’s hope we don’t get this far.  ;-)

> From f54561ac020a996c0a20f658dea29529ed7dc6b5 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@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.

OK for ‘core-updates’.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-07 23:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 21:57 [PATCH] utils: Strip duplicates from search path Eric Bavier
2015-02-07 23:14 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).