From mboxrd@z Thu Jan 1 00:00:00 1970 From: csanchezdll@gmail.com (Carlos =?utf-8?Q?S=C3=A1nchez?= de La Lama) Subject: Re: User-profile search paths should include system-profile directories Date: Mon, 26 Sep 2016 13:19:45 +0200 Message-ID: <7tbmza7vse.fsf@gmail.com> References: <7tpoo7kk73.fsf@gmail.com> <87eg4mo7dp.fsf@gnu.org> <7th99b9g0k.fsf@gmail.com> <87bmziabse.fsf@gmail.com> <7td1jyab63.fsf@gmail.com> <877fa5jn0y.fsf@gnu.org> <7tvaxoz23z.fsf@gmail.com> <878tuiuhr2.fsf@gnu.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]:39863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boTxr-0006rr-Fy for guix-devel@gnu.org; Mon, 26 Sep 2016 07:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boTxn-0002qt-NX for guix-devel@gnu.org; Mon, 26 Sep 2016 07:20:50 -0400 In-Reply-To: <878tuiuhr2.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 24 Sep 2016 04:57:37 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, Alex Kost Hi Ludo, >> Making this work would need two things: >> 1) not stripping unexisting directories from search paths >> 2) constructing environment variables prepending every profile root to >> the search paths of each profile. >> >> Now, my question is, why are unexisting search paths removed? > > I don=E2=80=99t think this is really the problem here. The problem here = is that > if a profile contains only, say, guile-json, there is no way Guix can > know about GUILE_LOAD_PATH because that variable is associated with > Guile itself, not with guile-json. The idea is each profile environment unconditionally adds search paths for all the profiles in use (which are passed when evaluating /etc/profile in the GUIX_PROFILES variable). This was the proposal in my first message (looks *similar* to an earlier post in the bug discussion, but it is quite different). In the case you suggest, the profile cointaining guile will define GUILE_LOAD_PATH to point inside its own profile and *also* inside the profile containing guile-json. The profile that has guile-json will do nothing, as its installer packages have no search paths. This is the key: export ACLOCAL_PATH=3D"${profiles//:/\/share/aclocal:}/share/aclocal So ACLOCAL_PATH will have an entry for /share/aclocal, regardless of that path existing or not. If path is not there, no harm done. If it is (i.e. that profile has a package installing an aclocal .m4 file) then aclocal will find it. I will try to prepare a patch, so we can see (and might be there is some problem I still fail to see). BR Carlos