Subject: bug#36311: closed (Re: bug#36311: doc: Add subsection and note about environment variables.)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 21 Feb 2025 22:17:10 +0000

Your bug report

#36311: doc: Add subsection and note about environment variables.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
36311: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36311
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#36311: doc: Add subsection and note about environment variables.
From: Simon Tournier <[email-masked]>
To: Maxim Cournoyer <[email-masked]>
Cc: swedebugia <[email-masked]>, [email-masked], Nicolas Goaziou <[email-masked]>
Date: Fri, 21 Feb 2025 22:55:16 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

For reference: https://issues.guix.gnu.org/issue/36311

On Fri, 01 Sep 2023 at 23:02, Maxim Cournoyer <[email-masked]> wrote:

>> From: swedebugia <[email-masked]>
>> Date: Thu, 20 Jun 2019 18:02:16 +0200
>> Subject: [PATCH] doc: Add subsection and note about environment variables.
>>
>> * doc/guix.texi (Binary Installation and Application Setup): Clarify the
>>   importance of correct environment variables.
>
> [...]
>
>> +@subsection Importance of environment variables
>> +@cindex environment variables
>> +Environment variables in the correct place are essential to the correct
>> +operation of guix in a foreign system.
>> +
>> +Following the installation we recommend putting all environment variables into
>> + @file{~.bash_profile} to make sure they are only executed when your login to
>> + a shell (ie. open up a virtual terminal).
>> +
>> +If you use bash and put them into @file{.bashrc} you will end up with errors
>> +because this file is executed by bash EVERY time a new environment is entered
>> +(e.g. when entering a pure environment with @command{guix environment guix
>> +--pure} and contaminate the environment).
>
> I think this is maybe no longer as necessary, since we now have 'guix
> shell --check' that will produce this kind of recommendation?

This question is still pending since 1 year, 24 weeks, 5 days… Too much
suspense! ;-)

I’m closing.  Feel free to reopen if I’m missing something.

Cheers,
simon

Subject: doc: Add subsection and note about environment variables.
From: swedebugia <[email-masked]>
To: [email-masked]
Date: Thu, 20 Jun 2019 18:13:55 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

-- 
Cheers Swedebugia
>From f7507682af3b4072596e36321b5ec240e7ab3a10 Mon Sep 17 00:00:00 2001
From: swedebugia <[email-masked]>
Date: Thu, 20 Jun 2019 18:02:16 +0200
Subject: [PATCH] doc: Add subsection and note about environment variables.

* doc/guix.texi (Binary Installation and Application Setup): Clarify the
  importance of correct environment variables.
---
 doc/guix.texi | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 65c3b8a7f..470157669 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -601,7 +601,9 @@ where @command{guix pull} will install updates (@pxref{Invoking guix pull}):
          ~root/.config/guix/current
 @end example
 
-Source @file{etc/profile} to augment @code{PATH} and other relevant
+@c This is explained further in @node Application Setup - Importance of
+@c environment variables
+Source @file{etc/profile} from @file{~.bash_profile} to augment @code{PATH} and other relevant
 environment variables:
 
 @example
@@ -1575,6 +1577,20 @@ When using Guix on top of GNU/Linux distribution other than Guix System---a
 so-called @dfn{foreign distro}---a few additional steps are needed to
 get everything in place.  Here are some of them.
 
+@subsection Importance of environment variables
+@cindex environment variables
+Environment variables in the correct place are essential to the correct
+operation of guix in a foreign system.
+
+Following the installation we recommend putting all environment variables into
+ @file{~.bash_profile} to make sure they are only executed when your login to
+ a shell (ie. open up a virtual terminal).
+
+If you use bash and put them into @file{.bashrc} you will end up with errors
+because this file is executed by bash EVERY time a new environment is entered
+(e.g. when entering a pure environment with @command{guix environment guix
+--pure} and contaminate the environment).
+
 @subsection Locales
 
 @anchor{locales-and-locpath}
-- 
2.19.2