GNU bug report logs -
#60112
[PATCH] website: Add post about guix shell fhs option.
Previous Next
Full log
Message #32 received at 60112 <at> debbugs.gnu.org (full text, mbox):
On Thu, Jan 05, 2023 at 10:00 PM, Ludovic Courtès wrote:
> Hi jman,
>
> jman <srht <at> city17.xyz> skribis:
>
>> Hello and sorry for getting into this comment thread.
>>
>> I have posted a few days ago a question about preserving env vars
>> when creating a container with FHS emulation:
>> <https://lists.gnu.org/archive/html/help-guix/2023-01/msg00002.html>
>
> The ‘PATH’ environment variable, and only this one, is overridden
> unconditionally when using ‘--emulate-fhs’; quoth ‘environment.scm’:
>
> (when emulate-fhs?
> ;; When running in a container with EMULATE-FHS?, override $PATH
> ;; (optional, but to better match FHS expectations), and generate
> ;; /etc/ld.so.cache.
> (setenv "PATH" "/bin:/usr/bin:/sbin:/usr/sbin")
> (invoke "ldconfig" "-X"))
>
> Other variables are preserved, as in this example:
>
> $ FOO=bar guix shell -CF -E ^FOO coreutils -- env | grep FOO
> FOO=bar
>
> HTH!
>
> Ludo’.
Now filed by jman as <https://issues.guix.gnu.org/60566> after discussion on #guix. I think it is a bug (say you want to preserve PATH as you have some scripts in ~/.local/bin for example) and I have a patch to fix. I'll send it to that bug and CC you (Ludo’) as well.
John
This bug report was last modified 2 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.