From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Eliminate environment variable hints? Date: Tue, 19 Feb 2019 08:41:47 +0100 Message-ID: <87va1gusw4.fsf@elephly.net> References: <87a7iswyki.fsf@elephly.net> <20190218221809.GA12263@jurong> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:39031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gw02R-0004AP-OV for guix-devel@gnu.org; Tue, 19 Feb 2019 02:42:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gw02Q-0004cl-Uu for guix-devel@gnu.org; Tue, 19 Feb 2019 02:41:59 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gw02Q-0004bk-K5 for guix-devel@gnu.org; Tue, 19 Feb 2019 02:41:58 -0500 In-reply-to: <20190218221809.GA12263@jurong> 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: Andreas Enge Cc: guix-devel@gnu.org Hi Andreas, > On Mon, Feb 18, 2019 at 10:56:13PM +0100, Ricardo Wurmus wrote: >> when installing a package into a profile Guix very helpfully tells you >> that you may need to set certain environment variables. It doesn=E2=80= =99t tell >> you that these environment variables can also be set by source=E2=80=99i= ng the >> generated etc/profile file. > > something I noticed is that I see these recommendations also when the > environment variables are already set, precisely by sourcing the (previou= s) > $HOME/.guix-profile/etc/profile. Now the profile changed, so they need to > be re-sourced (which I usually do by calling "bash" from bash, since I so= urce > from the .bashrc). > > On the other hand, using the recommended environment variables would surv= ive > profile changes, since they look like > export PATH=3D"/home/andreas/.guix-profile/bin:/home/andreas/.guix-pro= file/sbin${PATH:+:}$PATH" > instead of pointing to /gnu/store/...-profile/bin with a particular hash. > > So the two are clearly not equivalent. Which of them is actually > preferable? I find it a bit confusing that after running > "guix package -i hello" I cannot run "hello" immediately, unlike in > Debian. This only needs to be done when GUIX_PROFILE is not set. The definitions in etc/profile either reference /gnu/store directories directly (when GUIX_PROFILE is not set) or they reference the profile links (when GUIX_PROFILE is set). When GUIX_PROFILE is set an environment variable like PATH that is already set to the profile=E2=80=99s =E2=80=9Cbin=E2=80=9D directory will n= ot have to be defined again after installing another executable. -- Ricardo