From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#25917: [PATCH] file-systems: Factorize file-system-packages. Date: Sat, 18 Mar 2017 12:04:40 +0100 Message-ID: <87inn6alrr.fsf@gnu.org> References: <20170316174029.1663-1-dannym@scratchpost.org> <87efxwi8av.fsf@gnu.org> <20170317131958.734cdfba@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpCAT-0005kF-Az for bug-guix@gnu.org; Sat, 18 Mar 2017 07:05:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpCAQ-0004LS-6q for bug-guix@gnu.org; Sat, 18 Mar 2017 07:05:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35099) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cpCAQ-0004LO-4M for bug-guix@gnu.org; Sat, 18 Mar 2017 07:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cpCAP-0005vo-Sf for bug-guix@gnu.org; Sat, 18 Mar 2017 07:05:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20170317131958.734cdfba@scratchpost.org> (Danny Milosavljevic's message of "Fri, 17 Mar 2017 16:02:53 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Danny Milosavljevic Cc: 25917@debbugs.gnu.org Danny Milosavljevic skribis: > I'd like to make the following change to guix/build/utils.scm : > > diff --git a/guix/build/utils.scm b/guix/build/utils.scm > index bc6f11415..ca6360ed4 100644 > --- a/guix/build/utils.scm > +++ b/guix/build/utils.scm > @@ -409,7 +409,8 @@ for under the directories designated by FILES. For e= xample: > #:key > (separator ":") > (type 'directory) > - pattern) > + pattern > + keep-previous-path?) > "Look for each of FILES of the given TYPE (a symbol as returned by > 'stat:type') in INPUT-DIRS. Set ENV-VAR to a SEPARATOR-separated path > accordingly. Example: > @@ -430,7 +431,13 @@ denoting file names to look for under the directorie= s designated by FILES: > (let* ((path (search-path-as-list files input-dirs > #:type type > #:pattern pattern)) > - (value (list->search-path-as-string path separator))) > + (value (list->search-path-as-string path separator)) > + (previous-path (getenv env-var)) > + (value (if (and keep-previous-path? > + previous-path > + (not (string-null? previous-path))) > + (string-append value ":" previous-path) > + value))) > (if (string-null? value) > (begin > ;; Never set ENV-VAR to an empty string because often, the emp= ty > > Would that rebuild the world, though? Yep. I don=E2=80=99t think that is needed though: we can use =E2=80=98set-path-environment-variables=E2=80=99 like your patch did to set= PATH precisely. Thanks, Ludo=E2=80=99.