guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eliminate environment variable hints?


From: Dan Frumin
Subject: Re: Eliminate environment variable hints?
Date: Wed, 6 Mar 2019 14:48:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

Hi,

I just wanted to add that I use an interactive shell with a different syntax 
(fish),
so I cannot just source a bsh script from my shell rc (AFAIK). To that extent having Guix print the exact variables I should be setting is actually quite useful.

Best,
Dan

On 04-03-19 22:56, Ludovic Courtès wrote:
Hello,

Ricardo Wurmus <address@hidden> skribis:

when installing a package into a profile Guix very helpfully tells you
that you may need to set certain environment variables.  It doesn’t tell
you that these environment variables can also be set by source’ing the
generated etc/profile file.

I have seen the bashrc and bash_profile files of many users and they are
usually full of conflicting environment variable definitions.  In these
files I often also see these Guix recommendations.

I think Guix should suggest sourcing the generated etc/profile file
instead of listing explicit environment variable definitions.  It would
be less noisy and less confusing, in my opinion.

What do you think?

When (re)sourcing etc/profile, you might clutter some variables.  For
instance, if you do that several times, you can end up with:

   
PATH=$HOME/.guix-profile/bin:$HOME/.guix-profile/bin:$HOME/.guix-profile/bin:…

Conversely, the hint upon installation disappears if the entry is
already present in the variable.

That’s a fine point but I occasionally rely on this as a user.

That said, I understand your concern.  What about changing the message
to:

   You might need to run:

      . …/etc/profile

   Alternately, you can define the following environment variables:

      …

Too verbose?  Confusing?

Thanks,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]