doc: Add subsection and note about environment variables.

  • Open
  • quality assurance status badge
Details
3 participants
  • Nicolas Goaziou
  • Maxim Cournoyer
  • swedebugia
Owner
unassigned
Submitted by
swedebugia
Severity
normal
S
S
swedebugia wrote on 20 Jun 2019 18:13
(address . guix-patches@gnu.org)
d564fea7-f3a5-3798-c186-a66c4c23f7a1@riseup.net
--
Cheers Swedebugia
From f7507682af3b4072596e36321b5ec240e7ab3a10 Mon Sep 17 00:00:00 2001
From: swedebugia <swedebugia@riseup.net>
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(-)

Toggle diff (38 lines)
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
S
S
swedebugia wrote on 15 Jul 2019 13:01
(address . 36311@debbugs.gnu.org)
46ddf909-ff9f-4d40-b229-e594bf06eeaf@riseup.net
On 2019-06-20 18:13, swedebugia wrote:
Toggle quote (55 lines)
>
> --
> Cheers Swedebugia
>
> 0001-doc-Add-subsection-and-note-about-environment-variab.patch
>
> From f7507682af3b4072596e36321b5ec240e7ab3a10 Mon Sep 17 00:00:00 2001
> From: swedebugia<swedebugia@riseup.net>
> 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

Anyone up for reviewing?

--
Cheers
Swedebugia
N
N
Nicolas Goaziou wrote on 15 Jul 2019 13:32
(name . swedebugia)(address . swedebugia@riseup.net)(address . 36311@debbugs.gnu.org)
87wogjmt3a.fsf@nicolasgoaziou.fr
Hello,

swedebugia <swedebugia@riseup.net> writes:

Toggle quote (4 lines)
>> +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).

I think @file{~/.bash_profile} is clearer.

Also "ie. open up…" -> "i.e., open up…" or "i.e.@: open up…"

Toggle quote (3 lines)
>> +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

Maybe @emph{every}, since emphasizing with capitals is typographically
suboptimal.

Toggle quote (3 lines)
>> +(e.g. when entering a pure environment with @command{guix environment guix
>> +--pure} and contaminate the environment).

"e.g. when" -> "e.g., when" or "e.g.@: when".

See (info "Not Ending a Sentence") for more information.

Also, according to (info "@command"), it shoud be either @samp or @code.
After a cursory look, "guix.texi" seems to use "@code" for entire shell
command invocations.

HTH,

--
Nicolas Goaziou
N
N
Nicolas Goaziou wrote on 15 Jul 2019 16:22
(name . swedebugia)(address . swedebugia@riseup.net)(address . 36311@debbugs.gnu.org)
87o91vml83.fsf@nicolasgoaziou.fr
Correcting myself,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Toggle quote (2 lines)
> See (info "Not Ending a Sentence") for more information.

I meant (info "(texinfo)Not Ending a Sentence")
Toggle quote (3 lines)
>
> Also, according to (info "@command")

and (info "(texinfo)@command")
M
M
Maxim Cournoyer wrote on 2 Sep 2023 05:02
Re: bug#36311: doc: Add subsection and note about environment variables.
(name . swedebugia)(address . swedebugia@riseup.net)
8734zx1dmx.fsf@gmail.com
Hello,

swedebugia <swedebugia@riseup.net> writes:

Toggle quote (11 lines)
> --
> Cheers Swedebugia
>
>>From f7507682af3b4072596e36321b5ec240e7ab3a10 Mon Sep 17 00:00:00 2001
> From: swedebugia <swedebugia@riseup.net>
> 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.

[...]

Toggle quote (14 lines)
> +@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?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 2 Sep 2023 05:02
control message for bug #36311
(address . control@debbugs.gnu.org)
871qfh1dmn.fsf@gmail.com
tags 36311 + moreinfo
quit
?