From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: bug#20255: 'search-paths' should respect both user and system profile. Date: Sat, 21 Nov 2015 21:41:45 +0300 Message-ID: <874mgfkxee.fsf@gmail.com> References: <877ftschjt.fsf@gmail.com> <87fv8fip01.fsf@gnu.org> <87d23j1bxk.fsf@gmail.com> <871tjyfnl8.fsf@gnu.org> <876199q4z1.fsf@gmail.com> <87ioca4ojo.fsf@gnu.org> <87lh9tvcws.fsf@gnu.org> <87h9kguwc4.fsf@gmail.com> <87ziy7d90z.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]:32867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0D6r-0001ai-Ky for bug-guix@gnu.org; Sat, 21 Nov 2015 13:42:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0D6o-0002JW-CH for bug-guix@gnu.org; Sat, 21 Nov 2015 13:42:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:57578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0D6o-0002JS-8k for bug-guix@gnu.org; Sat, 21 Nov 2015 13:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a0D6n-0005FD-NX for bug-guix@gnu.org; Sat, 21 Nov 2015 13:42:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87ziy7d90z.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 21 Nov 2015 09:57:48 +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-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 20255@debbugs.gnu.org Ludovic Court=C3=A8s (2015-11-21 11:57 +0300) wrote: > Alex Kost skribis: > >> Ludovic Court=C3=A8s (2015-11-20 01:32 +0300) wrote: >> >>> -# Load the system profile's settings. >>> +if [ -x /run/current-system/profile/bin/guix ] >>> +then >>> + # Crucial variables such as 'MANPATH' or 'INFOPATH' may be missing f= rom the >>> + # profiles' individual 'etc/profile'. Thus, combine both profiles w= hen >>> + # computing the search paths. >>> + # >>> + # This may take a few hundred milliseconds, but it's OK because this= is >>> + # performed for log-in shells only. >>> + eval `/run/current-system/profile/bin/guix package \\ >>> + -p /run/current-system/profile \\ >>> + -p \"$HOME/.guix-profile\" --search-paths` >> >> Sorry, but it's not OK for me. As a user, I'm *strongly* against >> running 'guix' (or any other program) in /etc/profile. > > Why? (Honest question.) At first, because of the slowdown: it may be a few hundred milliseconds for you, but it's several seconds for me. But actually, even if it was several milliseconds, I still wouldn't like it, as (IMHO) /etc/profile should only set variables, and not run external programs. >> I would really like to have an option to avoid this. Is it possible? > > Not that I know of. Please read . What about making some environment variable which will be honored by 'operating-system-etc-service' procedure. So depending on this variable that 'eval ...' command will or will not be added to "/etc/profile" during 'guix system ...' process. For example, when I do: GUIX_IGNORE_SYSTEM_PROFILE_ENV=3D1 guix system build my-config.scm the "etc/profile" of the built system will not contain those 'eval ...' lines. WDYT? --=20 Alex